home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4368 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.3 KB  |  43 lines

  1. 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
  2. From: mstemper@ems.cdc.com (Michael Stemper)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Logical operators and operands
  5. Message-ID: <30502@nntp_server.ems.cdc.com>
  6. Date: 19 Nov 92 16:31:07 GMT
  7. References: <BxwrJC.GME@cs.uiuc.edu> <30476@nntp_server.ems.cdc.com>
  8. Sender: sys@ems.ems.cdc.com
  9. Reply-To: mstemper@ems.cdc.com
  10. Organization: Empros Systems International, a division of Ceridian
  11. Lines: 29
  12. Nntp-Posting-Host: kirk.ems.cdc.com
  13.  
  14. In article <30476@nntp_server.ems.cdc.com>, mstemper@ems.cdc.com (I) wrote:
  15. >
  16. >      IF ( CheckActivity(...) .EQ. .TRUE. ) THEN
  17. >
  18. >              ... is leagl but redundant, 
  19.  
  20. Not only is it not leagl, it's not even legal!
  21.  
  22. As Richard Maine pointed out to me, .EQ. and .NE. do not accept
  23. logical operands. The correct operators are: .EQV. and .NEQV.
  24.  
  25. #pragma opinions ON
  26.  
  27. This seems dumb! Why shouldn't the operators for equality and
  28. inequality be the same, no matter what type of operands are
  29. used? It seems to me that this is poor language design. Can
  30. somebody come up with a plausible excuse for this? Is it:
  31.  a) Tradition
  32.  b) History
  33.  c) Easier to optimize compilers
  34.  d) Grandfathered in
  35.  
  36. #pragma opinions OFF
  37.  
  38. -- 
  39. #include <Standard_Disclaimer.h>
  40. Michael F. Stemper
  41. Power Systems Consultant
  42. mstemper@ems.cdc.com
  43.