home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
- From: SEB1525@MVS.draper.com (Steve Bacher)
- Subject: Re: Spelt logical operators
- Message-ID: <19921215171413SEB1525@MVS.draper.com>
- Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
- Nntp-Posting-Host: mvs.draper.com
- Organization: Draper Laboratory
- References: <2902.imc@uk.ac.ox.prg>
- Date: Tue, 15 Dec 1992 22:14:00 GMT
- Lines: 20
-
- >Finally, why stop at the logical operators? The symbols % and // are not
- >very intuitive are they?
-
- Not only that, but it's damned confusing. Think about it:
-
- In TSO CLIST, / is integer division, // is remainder.
- (There's no floating point arithmetic in CLIST.)
- In REXX, / is float division, % is integer division, // is modulus.
- In C, / is normal division, % is modulus.
- In Common Lisp, / is integer division if all arguments are integers,
- otherwise float division - actually more complicated than this
- because of rationals, bignums, etc.
- In MacLisp, // is division as in Common Lisp, / being the escape char.
-
- In fact, I almost always have to look up that % does in C and REXX
- because I can never remember it.
-
- --
- Steve Bacher (Batchman) Draper Laboratory
- Internet: seb@draper.com Cambridge, MA, USA
-