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.
loops
Moderator: Benj
- robertpatterson
- Posts: 44
- Joined: Thu Feb 21, 2013 2:16 am
- Location: New England
- Been thanked: 6 times
- Contact:
- SteveM
- Posts: 55
- Joined: Tue Mar 25, 2014 2:09 pm
- Has thanked: 28 times
- Been thanked: 65 times
- Contact:
Re: loops
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... Apologies for the inconvenience - we'll get that fixed as soon as we can.
Best regards,
Steve.
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... Apologies for the inconvenience - we'll get that fixed as soon as we can.
Best regards,
Steve.
- robertpatterson
- Posts: 44
- Joined: Thu Feb 21, 2013 2:16 am
- Location: New England
- Been thanked: 6 times
- Contact: