< Futurebasic < Language < Reference

DEF CYCLE Statement

DEF CYCLE

Statement

✔ Appearance ✔ Standard ✔ Console

Syntax

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

Description

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.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.