Generic Function Example

ASSIGN/MYFUNC=FUNCTION((X,Y,Z),X*3+Y*2+Z)
Creates a user-defined function and assigns it to the variable MYFUNC. The function takes three parameters, X,Y, and Z.

The total of X + Y + Z is what gets returned when values are passed into the function, as shown here:

ASSIGN/V1=MYFUNC(7,2,5)
This assigns V1 the value 30 by evaluating the parameters passed into the function MYFUNC(7,2,5).

The values are then all added together (21 + 4 + 5) and passed to V1.