Next: , Previous: , Up: Functions   [Index]


9.4 Substituting Evaluation Result

The evaluation result of a function call may be substituted with one of the calling arguments by inserting a ‘.’ sign and the argument position in between the function name and the leading parenthesis.

    abs.0(-4);

evaluates as -4.

If the indicated argument is a reference one (writable variable), the variable is picked. The function call subexpression is still a value (the variable value), not a reference.

The same syntax works for function pointer calls, too.

    integer (*f)(integer);

    f = abs;
    f.0(-4);

is still -4.