![]() Program Loops
|
Loop Tiles ![]() Loops come in two flavors: indefinite and counted. An indefinite loop will loop forever unless specifically instructed to exit. A definite loop will repeat a certain fixed number of times, up to 255 (unless it's exited sooner). The loop in the example at the left is an indefinite loop. |
![]() There's no practical limit to the number of indefinite loops you can have in a program or how deeply they can be nested (unless you consider 64 nested loops to be a "practical" limit). There is a limit to the number of counted loops you can have, however. It's arrived at as follows: In each subroutine, count the maximum degree to which counted loops are nested (i.e. contained within one another). Add these numbers together for all your subroutines. The total has to be six or less. Once you reach this limit, you will not be allowed to exceed it, the loop counter will remain dark, and a warning "tooltip" will indicate the reason. |
Exit Tiles ![]() |