loops

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
User avatar
robertpatterson
Posts: 44
Joined: Thu Feb 21, 2013 2:16 am
Location: New England
Been thanked: 6 times
Contact:

loops

Post 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.

User avatar
SteveM
Posts: 55
Joined: Tue Mar 25, 2014 2:09 pm
Has thanked: 28 times
Been thanked: 65 times
Contact:

Re: loops

Post 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.

User avatar
robertpatterson
Posts: 44
Joined: Thu Feb 21, 2013 2:16 am
Location: New England
Been thanked: 6 times
Contact:

Re: loops

Post by robertpatterson »

I just used a loop inside a loop to get it done in the end.

Post Reply