- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(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 .
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page