home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4386 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.3 KB

  1. Path: sparky!uunet!mcsun!sun4nl!cwi.nl!dik
  2. From: dik@cwi.nl (Dik T. Winter)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: How does one return a logical value...???
  5. Message-ID: <7957@charon.cwi.nl>
  6. Date: 20 Nov 92 21:19:11 GMT
  7. References: <kf2iy2_00YUo8INXQF@andrew.cmu.edu> <BxzC1x.n0s@news.cso.uiuc.edu>
  8. Sender: news@cwi.nl
  9. Organization: CWI, Amsterdam
  10. Lines: 19
  11.  
  12. In article <BxzC1x.n0s@news.cso.uiuc.edu> ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi) writes:
  13.  > but now i was wondering why the writers of the standard 
  14.  > defined these new operators, .EQV. and .NEQV.
  15.  > to a first sight, it seems that overloading .EQ. and .NE. should be
  16.  > possible: the compiler would select the operator by looking at the
  17.  > operands.  Just as .GT. works for both integer and floats.
  18.  > Yet, if they did it this way there is probably a good reason.
  19.  > Does anybody know why?
  20.  > 
  21. Consider:
  22.     A .EQ. B .EQV. C .GT. D
  23. which as such can be written without parenthesis.
  24. This might have been a consideration.  (In passing I
  25. note that Algol 60 has also different equality operators
  26. for Booleans and non-Booleans, and Jim, Algol 60 has
  27. implication as operator.)
  28. -- 
  29. dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland
  30. home: bovenover 215, 1025 jn  amsterdam, nederland; e-mail: dik@cwi.nl
  31.