If you want a procedure to return a value, make sure that:
The procedure return type is defined. For more information on return type, see Declaring the Return Type.
The Return statement is used in the procedure code.
The following example returns the value of x or y with the Return statement.
if X < Y
return X
else
return Y
endif
For more information on how to write procedure code, see Entering Code.
For more information on how to call procedures, see Calling Procedures.