Lahey/Fujitsu Fortran

TARGET Statement

Description

The TARGET statement specifies that data objects have the target attribute and thus can be associated with a pointer.

Syntax

TARGET [::] object-name [(array-spec)] [, object-name [(array-spec)]] ...
Where:

object-name is the name of a data object.

array-spec is an array specification.

Example

integer,pointer :: z integer :: a=1 target :: a ! target statement integer,target :: b=2,c=3 ! target attribute z => a write(*,*) z z => b write(*,*) z z => c write(*,*) z

See Also

Pointer Assignment Statement