Is where a way to account for this error inside a for loop?
I.e. if (i) gets too high and is out of range, we break the loop.
Thank you
1 Answer
0
Is there a reason you cannot set the number of iterations based on the size of the data you are indexing?
For example:
for i(1, rows(x), 1);
z = x[i];
endfor;
will never return an index out of range
error, because the range of the loop is based on the size of the data.
Your Answer
1 Answer
0
Is there a reason you cannot set the number of iterations based on the size of the data you are indexing?
For example:
for i(1, rows(x), 1);
z = x[i];
endfor;
will never return an index out of range
error, because the range of the loop is based on the size of the data.