Calling a function

A function-invocation statement calls an EGL-generated function or a system function. When the called function ends, processing continues either with the statement that follows the call or (in complex cases) with the next process required in an expression or in a list of parameters.

The function can be qualified with the name of a library or package, or with the keyword this. For more on when these qualifiers are required, see Scope

You can pass the following kinds of arguments to a function:
If the called function returns a value, you can use the invocation anywhere that you otherwise use the value that the function returns. For example, you can use a function in a conditional statement, as in the following example:
if(getCustomer())
   ...
end

A BOOLEAN function that returns TRUE or a numeric function that returns a non-zero value passes the test.

You can use a literal as an argument if the access modifier is in or inOut. (Note that if the modifier is inOut, the argument is treated as if the in modifier were in effect.) The EGL-generated code creates a temporary variable of the parameter type, initializes that variable with the value, and passes the variable to the function.

If the parameter is a structured record, the argument must be a structured record.

Feedback