Return from a procedure, function, or program
RETURN [TO MASTER | <exp>]
The RETURN statement closes the active program file, releases memory variables and arrays defined as private, and passes control back to the calling program. The RETURN statement is also used to denote the end of a procedure definition.
If the TO MASTER is specified, then control is passed back to the highest level calling procedure.
If the optional <exp> is specified, it will be returned to the calling program if the procedure or function was called as a User Defined Function.
procedure example_1 do example_2 // Returns here <--------------- return procedure example_2 do example_3 return procedure example_3 if .T. return to master //------------^ endif return do example_1
Recital Server, Recital