Language Reference

RETURN Statement

returns to caller

RETURN <(operand)>;

where operand is the value of the function returned. Use operand only in function modules.

The RETURN statement causes IML to return to the calling point in a program. If a LINK statement has been issued, IML returns to the statement following the LINK. If no LINK statement was issued, the RETURN statement exits a module. If not in a module, execution is stopped (as with a STOP statement), and IML looks for more statements to parse.

The RETURN statement with an operand is used in function modules that return a value. The operand can be a variable name or an expression. It is evaluated, and the value is returned.

See the description of the LINK statement. Also, see Chapter 5 for details.

If you use a LINK statement, you need a RETURN statement at the place where you want to go back to the statement after LINK.

If you are writing a function, use a RETURN to return the value of the function. Here is an example:

    start sum1(a,b); 

Previous Page | Next Page | Top of Page