Return

A RETURN statement directs the calculation to return with or without a value. A RETURN statement must begin with the keyword RETURN. A RETURN statement may return the result of the calculation to be placed in the field that initiated the script.

A RETURN statement is also used to return results to one calculation script from another. Using a CALL statement temporarily suspends the current script calculation and sends control to another script file. A RETURN statement sends control back to the original script which may then continue processing.

Here are some sample RETURN statements:

RETURN(@("LAST_NAME") & ', ' & @("FIRST_NAME") & " " & @("MIDDLE_INIT"))

RESULT: Takes the data in the section variable field LAST_NAME adds a comma; adds the data in the section variable field FIRST_NAME; adds the data in the section variable field MIDDLE_INIT and places this data in another section variable field.

RETURN (CALL('FirstFile'))

RESULT: Returns the result of the calculation generated by calling the script FirstFile.

See also