return statement
.mdThe return statement terminates an internal or external subroutine, and returns execution control to the statement following the invoking call or gosub statement.
Syntax
return return {to statement.label}
Parameter(s)
| statement.label | Specifies the statement to which control is returned. |
| return_value |
The return_value terminates an internal or external function, and returns execution control to the statement following the invoking call or gosub statement. Required if returning from a user-defined function (deffun statement) as opposed to a local sub-routine call or remote sub-routine call. |
For Windows: Locally defined variables in external subroutines (and files opened to local file variables) are automatically abandoned or closed on return.
Description
The to clause can only be used with an internal subroutine, and transfers control to the specified statement label. This is not a recommended programming practice.
Example(s)
See also
Referenced by
2 topics mention return statement in its description.