- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Under issue number 279810 I reported to premier support that according to "Help Win32* Routines" the equivalent fortran data type for Win32 BOOL or BOOLEAN is LOGICAL(4), the passage can be found in the documentation:"Intel Visual Fortran CompilerUser's GuideUsing LibrariesUsing the Win32 RoutinesCalling Win32* Routines"
Issue status is "reproduced(escalated)", but nothing has been done since (issue submitted dec 2004), the same passage can still be found now under:"Intel Visual Fortran CompilerBuilding ApplicationsUsing LibrariesUsing the Windows API RoutinesCalling Windows API Routines"
Walter Kramer
I did press reply to get this meessage in the IVF versus CVF thread, but something must have gone wrong????
Message Edited by WKRAMER on 10-19-2005 02:06 PM
Link Copied
- « Previous
-
- 1
- 2
- Next »
24 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting idea...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because it's outside the defined standard behavior, so compiler writers can do anything they want, including bit-wise comparisons, treating it like
or considering it to be a syntax error and refusing to compile it.
If both values are generated entirely within Fortran, without using transfer or equivalence, the use of .eq. would almost certainly be safe.
I will also say that in 30 years of Fortran programming, I've yet to use the .eqv. operator. I've just never run into a situation where I wanted to do the same thing if two logicals both true or both false. Writing
has always struck me as pointless.
aLogical .and. bLogical
or considering it to be a syntax error and refusing to compile it.
If both values are generated entirely within Fortran, without using transfer or equivalence, the use of .eq. would almost certainly be safe.
I will also say that in 30 years of Fortran programming, I've yet to use the .eqv. operator. I've just never run into a situation where I wanted to do the same thing if two logicals both true or both false. Writing
aLogical .eqv. .true.
has always struck me as pointless.
Message Edited by emc-nyc on 10-21-2005 08:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve alias Dr. Fortran,
What about the following code? Is it correct?
HAPPENED = .True.
IF (A > B .AND. HAPPENED) Then
do something...
Regards,
Sabalan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following the precedence rules,
is treated as if it were:
since .AND. has a lower precedence than >
The Doctor's advice is the same, however. Put in the parentheses so you (and the compiler) don't have to guess what the meaning is.
(A > B .AND. HAPPENED)
is treated as if it were:
((A > B) .AND. HAPPENED)
since .AND. has a lower precedence than >
The Doctor's advice is the same, however. Put in the parentheses so you (and the compiler) don't have to guess what the meaning is.

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
- « Previous
-
- 1
- 2
- Next »