Difference between revisions of "Error Messages/40461"

Line 1: Line 1:
= Error Message Examples =
+
[[Category: Error messages]]
  
Assignment to slice 4 along IndexA is out-of-range.
+
== Error message examples ==
  
= Cause =
+
:<code>''Assignment to slice 4 along IndexA is out-of-range.''</code>
  
You tried to assign to a [[slice]] of a local variable that does not exist.
+
== Cause ==
  
The following code would trigger this error.<br>
+
You tried to assign to a [[slice]] of a [[Local Variables|local variable]] that does not exist.
<code><br>
 
Index IndexA := 1..3; <br>
 
Var LocalA := Array(IndexA, [1, 4, 9]);<br>
 
Slice(LocalA, IndexA, 4) := 16;<br>
 
...<br>
 
</code>
 
  
= Remedies =
+
The following code would trigger this error.
 +
<pre style="background:white; border:white; margin-left: 1em;">
 +
Index IndexA := 1..3;
 +
Var LocalA := Array(IndexA, [1, 4, 9]);
 +
Slice(LocalA, IndexA, 4) := 16;
 +
...
 +
</pre>
  
Correct the assignment so that you are assigning to a slice in the index range.
+
== Remedies ==
 +
Correct the assignment so that you are assigning to a [[slice]] in the index range.
  
<br><comments />
+
==See Also==
 +
* [[Arrays and Indexes]]
 +
* [[Array]]
 +
* [[Slice]]
 +
* [[Assignment Operator :=]]
 +
* [[Local Variables]]

Revision as of 19:43, 29 March 2016


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 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


You are not allowed to post comments.