home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!spool.mu.edu!umn.edu!noc.msc.net!uc.msc.edu!shamash!ems!ems.cdc.com!mstemper
- From: mstemper@ems.cdc.com (Michael Stemper)
- Newsgroups: comp.lang.fortran
- Subject: Logical operators and operands
- Message-ID: <30502@nntp_server.ems.cdc.com>
- Date: 19 Nov 92 16:31:07 GMT
- References: <BxwrJC.GME@cs.uiuc.edu> <30476@nntp_server.ems.cdc.com>
- Sender: sys@ems.ems.cdc.com
- Reply-To: mstemper@ems.cdc.com
- Organization: Empros Systems International, a division of Ceridian
- Lines: 29
- Nntp-Posting-Host: kirk.ems.cdc.com
-
- In article <30476@nntp_server.ems.cdc.com>, mstemper@ems.cdc.com (I) wrote:
- >
- > IF ( CheckActivity(...) .EQ. .TRUE. ) THEN
- >
- > ... is leagl but redundant,
-
- Not only is it not leagl, it's not even legal!
-
- As Richard Maine pointed out to me, .EQ. and .NE. do not accept
- logical operands. The correct operators are: .EQV. and .NEQV.
-
- #pragma opinions ON
-
- This seems dumb! Why shouldn't the operators for equality and
- inequality be the same, no matter what type of operands are
- used? It seems to me that this is poor language design. Can
- somebody come up with a plausible excuse for this? Is it:
- a) Tradition
- b) History
- c) Easier to optimize compilers
- d) Grandfathered in
-
- #pragma opinions OFF
-
- --
- #include <Standard_Disclaimer.h>
- Michael F. Stemper
- Power Systems Consultant
- mstemper@ems.cdc.com
-