| Directives |
|
| Format | WEND |
| *Note* | Refer to WHILE ..WEND Repeat Statements, for complete syntax. |
| Description | The WEND directive marks the end of a WHILE/WEND loop. When ProvideX reaches the WEND directive, the expression defined in the currently active WHILE is re-evaluated. If the result of the evaluation is not zero, control is returned to the directive following the WHILE. If the value is 0 (zero, false), control transfers to the directive following the WEND. |
| See Also | WHILE ..WEND Repeat Statements |
| Example | 0100 WHILE A$<>"E" 0110 LET K$=KEY(1,END=1000) 0120 READ (1)N$ 0130 PRINT "Key: ",K$," Name: ",N$ 0140 INPUT "Delete (Y/N):",A$ 0150 IF A$="Y" THEN REMOVE (1,KEY=K$) 0160 WEND 0170 STOP 1000 PRINT "End-of-file..." 1010 EXITTO 0170 |