Terminate a routine by returning control to the calling routine or operating system if executed from the Start() routine.
RETURN [<uValue>]
<uValue> | May be specified in a function or method definition to designate its return value. Procedure definitions do not allow <uValue> as part of the RETURN statement. See the FUNCTION and METHOD entries in this guide for information about default return values if <uValue> is not specified. |
All private variables created and local variables declared in the current routine are released from memory when control returns.
These examples illustrate the general form of the RETURN statement in a procedure and in a function:
PROCEDURE <idProcedure>()
<Statements>...
RETURN
FUNCTION <idFunction>()
<Statements>...
RETURN <uValue>
The next example returns an array, created in a function, to a calling routine:
FUNCTION PassArrayBack()
PRIVATE aArray[10][10]
aArray[1][1] = "myString"
RETURN aArray
BEGIN SEQUENCE, FUNCTION, LOCAL, PRIVATE, PROCEDURE, PUBLIC, QUIT