Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: What is the FORTRAN for ? Keywords: FORTRAN, stupidity Message-ID: <3480@goanna.cs.rmit.oz.au> Date: 29 Jul 90 07:30:05 GMT References: <1990Jul25.174153.16896@ecn.purdue.edu> <14449@lambda.UUCP> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 29 In article <14449@lambda.UUCP>, ttw@lambda.UUCP (Tony Warnock) writes: > For example: the .EQ. operator in Fortran is > an equivalence relation, that is, it is reflexive, > symetric, and transitive. It is not for C and for > Pascal. If that is a damning criticism of C and Pascal, please take into acount the fact that .EQ. is *NOT* an equivalence relation in Fortran either. Equivalence fails in at least two ways: (a) it is easy to find expressions e1, e2, e3 such that e1 .EQ. e2 is legal (and true) and e2 .EQ. e3 is legal (and true) but e1 .EQ. e3 is not permitted by the standard. (b) it is easy to find three CONSTANTS c1, c2, c3 such that c1 .EQ. c2 is true and c2 .EQ. c3 is true but c1 .EQ. c3 is false in the majority of Fortran implementations. The only Fortran I've ever used where this was not so was that on the B6700. (Hint: on a B6700 REAL variables are cheaper than INTEGERs.) Point (a) also applies to C and Pascal, in the sense that the corresponding e1' = e3' or e1' == e3' is not fully defined. Point (b) doesn't apply to (Classic) C. -- Science is all about asking the right questions. | ok@goanna.cs.rmit.oz.au I'm afraid you just asked one of the wrong ones. | (quote from Playfair)