The WHILE statement is used in conjunction with the FOR / NEXT or LOOP / REPEAT constructs to determine whether execution of the loop should continue.
IF expr = 0 THEN EXIT
If the CONDITIONAL.STATEMENTS option of the $MODE compiler directive is active, expr may be one of the following statements that in its normal form has a THEN/ELSE clause:
FILELOCK, FILEUNLOCK, FIND, FINDSTR, FLUSH, GETLIST, LOCATE, MATREAD, MATREADCSV, MATREADL, MATREADU, OPEN, OPENPATH, OPENSEQ, OSREAD, READ, READBLK, READCSV, READL, READLIST, READNEXT, READSEQ, READU, READV, READVL, READVU, SEEK, WRITEBLK, WRITECSV, WRITESEQ
When used in this way, the LOCKED or ON ERROR clauses normally associated with some of these statements are not available.
REMOVE ITEM FROM LIST SETTING DELIMITER
This program fragment displays items removed from dynamic array LIST. The loop is terminated when the value of DELIMITER becomes zero.
WHILE READNEXT ID