Chapter Contents |
Previous |
Next |
GOTO |
Category: | Control Flow |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
CALL GOTO(entry<,action<,frame>>); |
Type: Character
'A' |
adds entry to the top of the execution stack. The specified entry is displayed immediately. When the entry ends, the user returns to the window that was displayed before the program with the CALL GOTO was executed. |
'C' |
clears the current execution stack. The specified entry is displayed immediately, and the stack is cleared. When the entry ends, the user returns to the parent entry, if one was specified in the entry, or exits the AF window. This option may be useful if you have memory constraints. (This is the default.) |
'R' |
removes the top entry from the execution stack and places the entry specified in the GOTO routine on the top of the execution stack. The specified entry is displayed immediately. When the entry ends, the user returns to the next entry on the stack rather than to the program that contains the GOTO call. |
Type: Character
Type: Numeric
Details |
The GOTO routine branches immediately to a CBT, HELP, MENU, FRAME, or PROGRAM entry and transfers control to it. Statements that appear after GOTO are not executed, because control is transferred to the entry that is specified in the GOTO routine.
GOTO, which always starts a new stream, cannot be used in FSEDIT or FSVIEW programs.
Example |
Pass control to MYEND.PROGRAM, and end the SAS/AF session if the user issues the END command. Assume there is no parent entry specified.
if _status_='E' then call goto('myend.program','C');
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.