| |
|
| Format |
POP |
| |
|
| Description |
Use this
directive to pop, or clear, the top entry on the stack.
The POP directive performs the same
operation as an EXITTO stmtref directive
for terminating a FOR/NEXT
or GOSUB operation except that it does
not transfer control (to a statement reference), but
continues with the next statement in the execution
sequence. |
|
|
| *Note* |
Use the 'POP'
mnemonic (not the POP directive) if you
want to pop a child window superimposed on a parent
window. |
|
|
| |
|
| See
Also |
EXITTO End Loop, Transfer
Control
'POP'
or 'WR' Mnemonic |
| |
|
| Example |
ProvideX
will generate an Error #28: No corresponding FOR for NEXT
if it encounters a NEXT directive after
you POP a FOR loop. In
this example, the POP directive is used
to terminate a FOR loop, leaving the
GOSUB's RETURN entry on the
stack. (No Error #28 is generated.)
0100 GOSUB SCAN_FOR_IT
...
1000 SCAN_FOR_IT
1010 FOR I=1 TO 1000
1020 IF
X$[I]="MOOCOW" THEN POP; RETURN
1030 NEXT
1040 PRINT "NOT
FOUND"; RETURN
|