home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / rexx / 1414 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.3 KB  |  33 lines

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