Description |
RETURN is allowed only within a procedure.
Quits the procedure immediately.
If the corresponding procedure is a function procedure, RETURN defines the functions result.
Examples:
PROCEDURE capitalize(s : STRING) :STRING;
RETURN upper(s)
ENDPROC
PROCEDURE factorial(n : INTEGER) : INTEGER;
IF n<=1 THEN RETURN 1 ELSE RETURN n*factorial(n-1) END
ENDPROC
|