End

Use End to end execution of a routine or subprogram called by Call, Onerrgo, func, or fmet instruction.

Syntax

EndEnd EXPRESSION
Examples
# Example 1: A subprogram is calledCall COMPUTE(ARRAY(1..20),RESULT)...Subprog COMPUTE(ARRAY,RESULT)Const Integer ARRAY()Variable Decimal RESULTRESULT=avg(ARRAY)/1+abs(max(ARRAY))End : # Returns to the calling routine# Example 2: A func is calledRESULT=func CLEVER_COMPUTE(ARRAY(1..20))...Funprog CLEVER_COMPUTE(ARRAY)Const Integer ARRAY()End avg(ARRAY)/1+abs(max(ARRAY))# Example 3: Error handling routineOnerrgo ERROR_MANAGEMENT...# The code that executes here might be interrupted by an error...# ERROR_LIST is supposed to be an array containing the errors code that are considered as minor in the context$ERROR_MANAGEMENTIf find(errnum,MINOR_ERROR_LIST)MINOR_ERROR=1Resume : # Returns to the instruction following the execution that threw an error, MINOR_ERROR is setEndifEnd

Description and comments

Associated errors

No associated errors.

See also

Call, Subprog, Funprog, Trbegin, Commit, Rollback, Onerrgo, fmet, func.