Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section


Exits from the current function and returns a value from that function.


Return expression


The Return statement syntax has these parts:

expression Any numeric or string expression.


You use the Return statement to stop execution of a function and return the value of expression. If no Return statement is executed from within the function, the expression that called the current function is assigned the value undefined.


The following example illustrates the use of the Return statement:

Function IsGreaterThan(lower, upper)
If lower > upper Then
    Return False
ElseIf lower = upper Then
    Return False
    Return True
End If
End Function
Copy code to clipboard

See Also