TARGET

Purpose

Data objects with the TARGET attribute can be associated with pointers.

Syntax



                   .-,-----------------------------------.
                   V                                     |
>>-TARGET--+----+----variable_name--+------------------+-+-----><
           '-::-'                   '-(--array_spec--)-'
 
 

Rules

If a data object has the TARGET attribute, then all of the data object's nonpointer subobjects will also have the TARGET attribute.

A data object that does not have the TARGET attribute cannot be associated with an accessible pointer.

A target cannot appear in an EQUIVALENCE statement.

+-------------------------------IBM Extension--------------------------------+

A target cannot be an integer pointer or a pointee.

+----------------------------End of IBM Extension----------------------------+

Attributes Compatible with the TARGET Attribute





Examples

REAL, POINTER :: A,B
REAL, TARGET  :: C = 3.14
B => C
A => B       ! A points to C

Related Information

IBM Copyright 2003