This repository was archived by the owner on Jan 26, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
While
Peter Tillema edited this page Nov 26, 2018
·
2 revisions
While
is the close sibling of Repeat
. The difference here is, the condition is evaluated at the beginning of the loop, instead of at the end like Repeat
. Another difference is that While
checks for code to be true (any number other than 0) to run the loop. You can use Repeat
if you want the code inside it to be run at least once, and you can use While
if you want the code inside it to run only when the condition evaluates to true (and for however long the condition evaluates to true). Example:
0→A
While A<16777000
rand→A
End
The example stores 0 into A
, and then continually stores a random number into A
, until the number is greater than or equal to 16777000. Once again, inefficient code but it's for example purposes.
ICE Compiler | Peter Tillema
- Introduction
- Building your first program
- Math and numbers
- Variables
- Standard system commands
- Program flow control
- Pointers
- Graphics
- Sprites
- Tilemaps
- Useful routines