Increment
See Also: Decrement, Integer, Repeat, While
Purpose
To increase the value of an integer variable by one.
Syntax
Increment {variable}
Where {variable} is an integer variable.
What It Does
Increment adds one to the value of {variable}.
Increment is generally useful for maintaining ascending counters, especially those which control While... Loop, Repeat... Until, and similar structured loops.
Example
The example below displays ten lines of text to the screen, showing the value of iCounter each time the loop iterates.
Integer iCounter
Move 0 to iCounter
Repeat
Showln "The value of iCounter is " iCounter
Increment iCounter
Until (iCounter >= 10)