Error message examples
In an assignment of the form 'Slice(X, 1) := ...', the value of the local variable
X must have an implicit dimension of be one-dimensional.
You are either:
- assigning to a slice of a non dimensional variable.
- assigning to a slice of a multidimensional variable.
You cannot use the Slice function with non dimensional variables. You need to specify the dimension being used to slice for a multidimensional variable.
In the following example, an assignment is made to a slice of C, a multidimensional variable.
Index A := 1..3;
Index B := 4..6;
Var C: Array(A, B, A*B);
Slice(C, A, 1) := 5;
If you are trying to slice a multidimensional variable, pass in the index being used to slice the variable for assignment.