RETURN Command

Example   See Also

Returns program control to a calling program.

Syntax

RETURN [eExpression | TO MASTER | TO ProcedureName]

Arguments

eExpression

Specifies an expression returned to the calling program. If you omit RETURN or the return expression, true (.T.) is automatically returned to the calling program.

TO MASTER

Returns control to the highest-level calling program.

TO ProcedureName

Specifies the procedure to which control is returned.

Remarks

RETURN terminates execution of a program, procedure, or function and returns control to the calling program, the highest-level calling program, another program, or the Command window.

Visual FoxPro releases PRIVATE variables when RETURN is executed.

RETURN is usually placed at the end of a program, procedure, or function to return control to a higher-level program. However, an implicit RETURN is executed if you omit RETURN.