Description
Increase selected by blockLength when strictly beyond cursor, or at cursor when shiftAtBoundary is true.
An index map tracks where one item lands after a structural list operation. Zero-based element positions differ from boundary cursors, and missing destinations need a sentinel.
Increase selected by blockLength when strictly beyond cursor, or at cursor when shiftAtBoundary is true.
When to use this tool
Use List Insert Block Cursor Boundary when you need one item's position under an explicit list transformation.
How to use the tool and how it works
- Enter length, cursor, blockLength, selected, shiftAtBoundary. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read newIndex. Use the output convention below.
Increase selected by blockLength when strictly beyond cursor, or at cursor when shiftAtBoundary is true. Otherwise retain it.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| length | Length, count, or code length under the stated domain and unit convention. | Required. Safe integer; minimum 1. |
| cursor | Cursor | Required. Safe integer; minimum 0. |
| blockLength | Block Length | Required. Safe integer; minimum 0. |
| selected | Selected | Required. Safe integer; minimum 0. |
| shiftAtBoundary | Shift At Boundary | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| newIndex | New Index | Required. Safe integer. |
{
"input": {
"length": 5,
"cursor": 2,
"blockLength": 3,
"selected": 2,
"shiftAtBoundary": true
},
"output": {
"newIndex": 5
}
} Limitations and assumptions
- The equality policy is explicit and can differ from ordinary element-insertion semantics; no list values are changed.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Apply the operation to a small representative list when checking a consuming language's indexing and slicing semantics.
References
Similar or alternative tools
- List: List Insertion Cursor Shift
Shift cursor by insertedCount when it lies after insertionIndex or equals it with after affinity.
- List Insert Delete Index Roundtrip
Shift selected right when at or beyond insertedAt.