Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileREPEAT (instructions) UNTIL condition condition: bexp The REPEAT-UNTIL command provides an 'exit tested' loop in which a number of instructions are repeated until a logical condition is true. When the command REPEAT is reached in a program, the group of instructions up to the UNTIL are processed. Then it checks whether the logical condition after UNTIL is true (-1). If this is the case, then the instructions after the UNTIL are implemented. However, if the condition is false (0), then the program execution jumps to the REPEAT. The instructions between REPEAT and UNTIL are processed at least once, as long as the loop is not left by an EXIT IF or GOTO command. ENDREPEAT can be used in place of UNTIL, which the Interpreter automatically replaces by UNTIL. Examples: REPEAT UNTIL MOUSEK --> Waits for a mouse button to be depressed. i=1 REPEAT INC i j=SQR(i) UNTIL i>10 AND FRAC(j)=0 PRINT i --> Displays the number '16' on the screen.