- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel Compiler 12.0 and have turned on the "Warn for Non-Standard Fortran" switch (/stand:f03) and received over 30,000 warnings many of which are #7334. The following code sample replicates the problem causing thewarning: (warning #7334: F2003 component is being referenced as if it were a structure type; this is not standard Fortran 2003. [ARRAY]). The warning refers to using ARRAY(J).X =. Can someone clarify what the problem is and how this can be fixed? Thanks.
IMPLICIT NONE
INTEGER(4) J
TYPE A
REAL(8) X
END TYPE
TYPE(A) ARRAY(10)
!
DO J = 1,10
ARRAY(J).X = DBLE(J**2)
WRITE(*,*) ARRAY(J)
ENDDO
END
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace the "dot" with %
ARRAY(J)%X = etc
Les
ARRAY(J)%X = etc
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Les, thatexplains it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To clarify - the dot comes from the DEC Fortran STRUCTURE/RECORD extension circa 1985. Later, Fortran 90 added derived types which were similar, and the % character was used as a field separator. Intel Fortran generally treats these as equivalent, with some exceptions. A lot of people think the use of dot is "prettier", but it is non-standard and sometimes leads to parsing ambiguity in combination with newer language features.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page