8.7.3 Pointer Arguments

An argument is a pointer if it is declared with the POINTER attribute.

A dummy argument that is a pointer can be associated only with an actual argument that is a pointer. However, an actual argument that is a pointer can be associated with a nonpointer dummy argument.

If both the dummy and actual arguments are pointers, an explicit interface is required.

When a procedure is invoked, the dummy argument pointer receives the pointer association status of the actual argument. If the actual argument is currently associated, the dummy argument becomes associated with the same target.

The pointer association status of the dummy argument can change during the execution of the procedure, and any such changes are reflected in the actual argument.

If a pointer actual argument is an array, the corresponding pointer dummy argument must be a deferred-shape array.

A pointer actual argument can correspond to a nonpointer dummy argument if the actual argument is associated.

If the actual argument has the TARGET attribute, any pointers associated with it do not become associated with the corresponding dummy argument when the procedure is invoked, but remain associated with the actual argument.

If the dummy argument has the TARGET attribute, any pointer associated with it becomes undefined when execution of the procedure completes.

For More Information:


Previous Page Next Page Table of Contents