Home      Downloads             Documentation      FAQ     

Documentation>ETP-Basic reference>Function or procedure call

 

Function or procedure call

The call of a procedure is an instruction, it can't be in an expression. You only have to write the procedure name and to give, if necessary, the arguments.

ProcedureName
ProcedureName2 Arg1, Arg2, ...



Function call

You must call a function in an expression. This expression can be used for an affectation or for an argument.

For example, an affectation :

VariableName = term1 + term2 * Function1(Arg1, Arg2, ...)

 

The function Function1 must return a variable of the same type as the affected variable.

Here is a mathematical example : For a composed function, f = g o h, that is f(x) = g(h(x)), you have to write :

Function f (x as Float) as Float
Return g( h(x))

Here, the function f takes the variable x, evaluate h(x) and then passes the result as an argument to g. So, we calculate g( h(x)).

 

Documentation>ETP-Basic reference>Function or procedure call

     
    About ETP Contact Us