XL Fortran for AIX 8.1

Language Reference

TARGET

Purpose

Variables with the TARGET attribute can become pointer targets.

Format



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

Rules

Although the target of a pointer can also be a pointer, this target cannot have the TARGET attribute.

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


  • ALLOCATABLE
  • AUTOMATIC
  • DIMENSION
  • INTENT

  • OPTIONAL
  • PRIVATE
  • PUBLIC

  • SAVE
  • STATIC
  • VOLATILE

Examples

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

Related Information


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]