Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

IVF doc error? TYPE

jimdempseyatthecove
Black Belt
107 Views

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
Steven_L_Intel1
Employee
107 Views

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.

jimdempseyatthecove
Black Belt
107 Views

>>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

Steven_L_Intel1
Employee
107 Views

(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 .

Reply