I need a counter that stops at one of two values, which ever is reached first.
Example
for r=1: (if statement here) for c=1: (if statement here) do things endend
I've tried achieving what I need with two nested while loops:
while r < r1 && r < r2 r=r+1 while r < r1 && r < r2 c=+c+1 if condition else stuff end endend
but the first while loop just counts through all it's iterations and then moves onto the 2nd while loop, rather than counting once then moving into the 2nd while loop until that condition is met.
Best Answer