RET - Return A Value To Another USERCALC Or Program#
This command allows a Function or Qualifier to return a value to another UserCalc or program.
The RET command appears only at line 99999 in Functions and Qualifiers.
Functions may return a Number, Char(acter), Date or Boolean (True, False) variable.
Qualifiers may only return Boolean (True, False) variable.
As line 99999 may only be used one time, users must refer to a variable in the Return statement. That variable contains the Number, Char(acter), Date or Boolean result.
- Statement
- If the employee is hired after January 1st, 1990 they are entitled to a vacation accrual. This UserCalc is placed on Attendance Component A010 - Preprocessing UserCalc.
Line | CMD | OT | Operand 1 | OPER | OT | Operand2 | OT | Operand3 | If Goto | Else GoTo |
---|---|---|---|---|---|---|---|---|---|---|
00010 | IF | DB | EEM.HIRE_DATE | GT | D | 01-JAN-1990 | 00100 | 00200 | ||
00100 | LET | V | GIVE ACCRUAL | EQ | B | TRUE | 99999 | |||
00200 | LET | V | GIVE ACCRUAL | EQ | B | FALSE | 99999 | |||
99999 | RET | V | GIVE ACCRUAL | 99999 |