EGL Reference Guide for iSeries

return

The EGL return statement exits from a function and optionally returns a value to the invoking function.



Syntax diagram for the return statement

returnValue
An item, literal, or constant that is compatible with the returns specification in the EGL function declaration.

Although an item must correspond in all ways to the returns specification, the rules for literals and constants are as follows:

A function that includes a returns specification must terminate with a return statement that includes a value. A function that lacks a returns specification may terminate with a return statement, which must not include a value.

The return statement gives control to the first statement that follows invocation of the function, even if the statement is in an OnException clause in a try block.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]