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