Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.arch Subject: Re: Comparison operators (was: He's not the only one at it again!) Message-ID: <363@taumet.com> Date: 31 Jul 90 15:43:03 GMT References: <25681@cs.yale.edu> <9007301417.AA21099@thep.lu.se> Organization: Taumetric Corporation, San Diego Lines: 28 magnus@THEP.LU.SE (Magnus Olsson) writes: >If you want to see a *really* ugly solution, have a look at Fortran, >where the comparison operators are written .EQ., .GT. and so on. >BTW, does anyone know the reason for this? In Algol and C, you *must* >have different operators ... By "this", I assume you mean the FORTRAN operators .EQ. etc. We must remember the kinds of I/O equipment in use when FORTRAN was developed in the mid-1950's. There was no ASCII character set, and manufacturers used their own (incompatible) character sets and encodings. There were usually none of the characters < > : ; ' " nor others that we are now accustomed to. Beyond this, the FORTRAN rule was that spaces did not matter, and could be inserted or deleted anywhere without changing the program except in Hollerith fields (literal character strings). You could not write IF (A < B) ... but IF (A LT B) ... had to mean the same as IF(ALTB) ... This was made unambiguous by using dots in the operators which looked like identifiers (.EQ. .GT. .AND. .OR. etc). IF(A.LT.B) ... -- Steve Clamage, TauMetric Corp, steve@taumet.com