Difference between revisions of "Error Messages/40461"
AManandhar (talk | contribs) m (Created page with '= Error Message Examples = Assignment to slice 4 along IndexA is out-of-range. = Cause = You tried to assign to a slice of a local variable that does not exist. The foll…') |
(Local Variables --> Local Values (terminology change)) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category: Error messages]] | |
− | + | == Error message examples == | |
− | + | :<code>''Assignment to slice 4 along IndexA is out-of-range.''</code> | |
− | + | == Cause == | |
− | + | You tried to [[Slice assignment|assign to a slice]] of a [[Local Values|local value]] that does not exist. | |
− | + | The following code would trigger this error. | |
− | Index IndexA := 1..3; | + | <pre style="background:white; border:white; margin-left: 1em;"> |
− | Var LocalA := Array(IndexA, [1, 4, 9]); | + | Index IndexA := 1..3; |
− | Slice(LocalA, IndexA, 4) := 16; | + | [[Var]] LocalA := [[Array]](IndexA, [1, 4, 9]); |
− | ... | + | [[Slice]](LocalA, IndexA, 4) := 16; |
− | </ | + | ... |
+ | </pre> | ||
− | = Remedies = | + | == Remedies == |
+ | Correct the assignment so that you are assigning to a [[slice]] in the index range. | ||
− | + | ==See Also== | |
− | + | * [[Arrays and Indexes]] | |
− | + | * [[Array]] | |
+ | * [[Slice]] | ||
+ | * [[Slice assignment]] | ||
+ | * [[Assignment Operator :=]] | ||
+ | * [[Local Variables]] |
Latest revision as of 00:00, 5 January 2017
Error message examples
Assignment to slice 4 along IndexA is out-of-range.
Cause
You tried to assign to a slice of a local value that does not exist.
The following code would trigger this error.
Index IndexA := 1..3; [[Var]] LocalA := [[Array]](IndexA, [1, 4, 9]); [[Slice]](LocalA, IndexA, 4) := 16; ...
Remedies
Correct the assignment so that you are assigning to a slice in the index range.
See Also
Comments
Enable comment auto-refresher