Futurebasic/Language/Reference/def cycle

DEF CYCLE StatementEdit

DEF CYCLEEdit

StatementEdit

✔ Appearance ✔ Standard ✔ Console

SyntaxEdit

DEF CYCLE (min%, max%, var%)

DescriptionEdit

Use this statement when you need to cycle the value of an integer variable through a series of consecutive values and then back to the minimum value. The DEF CYCLE statement is equivalent to the following lines:

INC(var%)

IF var% < min% OR var% > max% THEN var% = min%

min% and max% must be short integer values, and var% must be a short integer variable.