Futurebasic/Language/Reference/def cycle

DEF CYCLE Statement edit

DEF CYCLE edit

Statement edit

✔ Appearance ✔ Standard ✔ Console

Syntax edit

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

Description edit

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.