Chapter Contents |
Previous |
Next |
SAS Component Language: Reference |
The RETURN statement stops the execution of the program section that is currently executing.
RETURN <value>; |
The RETURN statement at the end of a reserved program section (FSEINIT ,INIT, MAIN, TERM, and FSETERM) sends control to the next program section in the sequence.
The first RETURN statement after a LINK statement returns control to the statement that immediately follows the LINK statement.
When the RETURN statement is encountered at the end of a window variable section, control returns to the next section in the program execution cycle. That next section may be another window variable section or it may be the MAIN section. When the current program execution cycle finishes, control returns to the application window.
The RETURN statement at the end of a method returns control to the calling program.
The RETURN statement for an ENTRY or METHOD block can return value if the ENTRY or METHOD statement contains RETURN=data-type. The returned value has no effect if control does not immediately return to the calling program.
For an example of the RETURN statement, see the example in Branching to Another Entry (GOTO). For more explanation and an additional example, see RETURN.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.