Function reference
- Actual arguments that are expressions are evaluated.
- Actual arguments are associated with their corresponding dummy arguments.
- Control transfers to the specified function.
- The function is executed.
- The value (or status or target, for pointer functions) of the function result variable is available to the referencing expression.
If the binding_name in a function
reference is that of a specific function, the function referenced
is the one identified by the binding with that name in the dynamic
type of the data-ref.
- If the reference is consistent with one of the specific bindings of that generic binding, that specific binding is selected.
- Otherwise, if the reference is consistent with an elemental reference to one of the specific bindings of that generic binding, that specific binding is selected.

Execution of a function reference must not alter the value of any other data item within the statement in which the function reference appears. Invocation of a function reference in the logical expression of a logical IF statement or WHERE statement can affect entities in the statement that is executed when the value of the expression is true.
The argument
list built-in functions %VAL and %REF are
supplied to aid interlanguage calls by allowing arguments to be passed
by value and by reference, respectively. They can be specified in
non-Fortran procedure
references and in a subprogram statement in an interface body. (See %VAL and %REF (IBM extension).) See Statement Function and Recursion examples
of function references. 
On entry to an allocatable function, the allocation status of the result variable becomes not allocated
The function result variable may be allocated and deallocated any number of times during the execution of the function. However, it shall be allocated and have a defined value on exit from the function. Automatic deallocation of the result variable does not occur immediately on exit from the function, but instead occurs after execution of the statement in which the function reference occurs.



