WHILE - IS - DO

The WHILE statement evaluates if the condition given by the relational operator between the first and second values is positive. While it is, the code between the WHILE and REPEAT statements is repeatedly ran.

Syntax:

WHILE <NUMBER-VAR or NUMBER or VECTOR or LIST> IS <REL-OP-NUM> <NUMBER-VAR or NUMBER or VECTOR or LIST> DO
#Code goes here
REPEAT

or

WHILE <TEXT-VAR or TEXT or VECTOR or LIST> IS <REL-OP-TEXT> <TEXT-VAR or TEXT or VECTOR or LIST> DO
#Code goes here
REPEAT

Possible values of REL-OP-NUM (number relational operator):

  • EQUAL TO

  • NOT EQUAL TO

  • GREATER THAN

  • LESS THAN

  • GREATER THAN OR EQUAL TO

  • LESS THAN OR EQUAL TO

Possible values of REL-OP-TEXT (text relational operator):

  • EQUAL TO

  • NOT EQUAL TO