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.
X is multiplied by 3.
Y is multiplied by 2.
Z holds the passed value.
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).
7 is the parameter and is substituted where X occurs in the expression portion of the function definition. Thus, X*3 becomes 7*3, or 21.
2 is substituted where Y occurs. Thus Y*2 becomes 2*2, or 4.
5 is substituted where Z occurs.
The values are then all added together (21 + 4 + 5) and passed to V1.