I need solutions in which a function - in addition to its returned value - also returns the parameter values.
In this case, in the current parameter list, we must put an @ sign in front of the name of the scalar parameter-variable, so that the value of the variable can be modified by the function. The new value can be assigned to this variable and/or in a sub-function. e.g:
Code:
    parameters myVar
       myVar = m_var
or
     =udf(@myVar)
I don't know how the value of the parameter can be changed if it is an array or an object. In such cases, the parameter is passed by address, so there is no need for the @ sign. I don't know how the parameter value (content, size, structure) can be changed within the function - corresponding to the example above.


I'm thinking of such possibilities (I don't know which ones are allowed and which ones are not), but there may be other solutions:
Maybe someone can help?

1. if the formal parameter is a static array

Code:
parameters myArray

1/a: declare myArray[x,y]
1/b: dimension myArry[x,y]
1/c: myArray = m.m_array
1/d: amembers(myarray,myObj) (or another Lianja function, e.g. astore(myArray, myString)
1/e: udf(myArray,<params>) (a udf whose parameter is an array)
1/f: myArray = udf(<params>) (a function that returns an array)
2. if the formal parameter is an object (or dynamic array)

Code:
parameters myobj

2/a: myobj = array() or myobj = object()
2/b: myObj = m.Obj
2/c: addproperty(myObj, cProp, xVar)
2/d: removeproperty(myobj, cprop)
2/e: udf(myobj,<params>)
2/f: myObj = udf(<params>)