The RETURN statement terminates execution of the procedure currently running and returns control to the procedure that invoked it. The calling procedure then resumes execution with the next statement. This command has the form:
RETURN [(expr)]
where
[expr] is an expression whose value can be given to the
user when control is returned.
A RETURN statement can be placed anywhere in a procedure.
Example:
IF (STATUS = "DONE")THEN RETURN ENDIF
The RETURN statement is often used to return values from user defined functions. See the section on user defined functions for further examples.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.