•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
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-FileEXIT IF condition

condition: bexp

By means of EXIT IF loops can be jumped out of, if the Boolian (logical)
condition is fulfilled. The actual loop type is arbitrarily selectable. EXIT IF
can be used within IF-ENDIF and SELECT-ENDSELECT.

Example:

    DO
      EXIT IF MOUSEK
    LOOP
    REPEAT
      EXIT IF INKEY$="x"
    UNTIL FALSE

--> The program terminates, if first a mouse button is pressed and then the 'x'
    key is pressed.

Memo: Simple way to leave a loop: EXIT IF TRUE

      This fails compiled:
      DO
        EXIT IF FALSE  !generates 2 linker errors (?)
        EXIT IF 0      !same issue!
      LOOP
      Seems ok in the interpreter.