|Abbreviation:||S, T, Shift+E|
in BASIC ROM:
|List of all BASIC keywords|
Type: Keyword part
In Commodore BASIC V2, the keyword STEP is used in contexts of a FOR...TO...STEP...NEXT loop construction (for short: FOR...NEXT loop). This keyword has to be followed by an numerical expression which is evaluate only once and will be stored for later usage in stepping through the FOR loop variable. The default value is 1 if STEP is omitted. Even a value of 0 is allowed which builds an infinite loop, but such one can be forced to terminate if the loop variable is explicitly set to the end value introduced by the TO keyword.
Important: This keyword may not used as a variable name or be a part of it. If the keyword STEP is encountered in any other context the BASIC error ?SYNTAX ERROR occurs.
Examples[edit | edit source]
Infinite loop with a forced exit:
Read keys character by character and show them until the RETURN key is pressed.
See also examples for BASIC commands