Page 1 of 1

loops

Posted: Wed Jun 18, 2014 7:02 pm
by robertpatterson
I did a loop bigger than 256 it did not warn me It will maf function Not a big deal But something should have poped up warning me.

It seems to loop forever when that is done.

Re: loops

Posted: Thu Jun 19, 2014 10:16 am
by SteveM
Hi Robert,

This is a known bug that has been passed to our programmers to look at. For some reason the compiler is always using just a single byte for the loop index, even if you specify a value that doesn't fit into a byte - so the counter just keeps wrapping around to zero and never reaches the target.
The simplest work-around is to use a "while" loop, and define your own index counter, which you can then specify as an Integer or Long variable type to cope with the larger loop values. For example...
Long Loops.PNG
(19.1 KiB) Downloaded 1688 times
Apologies for the inconvenience - we'll get that fixed as soon as we can.

Best regards,
Steve.

Re: loops

Posted: Thu Jun 19, 2014 10:45 am
by robertpatterson
I just used a loop inside a loop to get it done in the end.