Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

IVF doc error? TYPE

Index:

TYPE | TYPE Statement (Derived Type)

In the following example, a and b are both variable arrays of derived type pair:

 TYPE (pair)
   INTEGER i, j
 END TYPE
 TYPE (pair), DIMENSION (2, 2) :: a, b(3)

Is that correct? If so, explain further.

Jim Dempsey

0 Kudos
3 Replies
Highlighted

No, that first TYPE(pair) is

No, that first TYPE(pair) is incorrect. I will let the writers know - thanks.

I also don't like the use of b(3) in the declaration that has DIMENSION(2,2). It's legal but bad style in my opinion.

Retired 12/31/2016
0 Kudos
Highlighted

>>I also don't like the use

>>I also don't like the use of b(3) in the declaration that has DIMENSION(2,2). It's legal but bad style in my opinion.

Then what is b?

(1:3) or (1:2,1:2,1:3)

Jim Dempsey

0 Kudos
Highlighted

(1:3).

(1:3).

The type declaration statement also specifies the attributes whose keywords appear in the attr-spec, except that the DIMENSION attribute may be specified or overridden for an entity by the appearance of array-spec in its entity-decl , and the CODIMENSION attribute may be specified or overridden for an entity by the appearance of coarray-spec in its entity-decl .

Retired 12/31/2016
0 Kudos