- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Fortran 11.1 update 5 gives a syntax error (found '.' when expecting ... well, pretty much anything else it seems) on the following.
The compiler seems to accept a similar pattern using an intrinsic operator - something like .NOT. (.OpOnA. a) - is there an addiitonal restriction for user defined operators that I'm missing?
If I put the expression in parenthesis the compiler complains (with /stand:f03 /warn:all) that the added () is an extension. Isn't an expression in () just another expression? Or does the std express that such expressing of expressions is expressly forbidden?
Thanks,
IanH
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ian,
Your attachment wasn't attached (accessible).
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, that's a bug. Issue ID is DPD200151085.
The parentheses issue is interesting. What would be non-standard is:
WRITE (*,*) (A,B,C)
But in a WRITE, a single I/O list item can be an expression which can be in parentheses. I'll report that too. However, you can use the parentheses as a workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[fortran]MODULE A IMPLICIT NONE PRIVATE PUBLIC :: OPERATOR(.OpOnA.) TYPE, PUBLIC :: AType LOGICAL :: logical_comp END TYPE AType INTERFACE OPERATOR(.OpOnA.) MODULE PROCEDURE op_on_atype END INTERFACE OPERATOR(.OpOnA.) CONTAINS FUNCTION op_on_atype(obj) RESULT(val) TYPE(AType), INTENT(IN) :: obj LOGICAL :: val !**** val = obj%logical_comp END FUNCTION op_on_atype END MODULE A PROGRAM OutOutDamnSpot USE A IMPLICIT NONE TYPE(AType) :: an_array(1) !**** an_array(1)%logical_comp = .FALSE. WRITE (*, *) .OpOnA. an_array(1) ! error #5082 here END PROGRAM OutOutDamnSpot [/fortran]
(Or am I confused about what got fixed? If so - then I'm still seeing the non-standard usage warning with /stand:f03 and friends)
Ta,
IanH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem you had will be fixed in the next major release.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page