home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11578 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  1.6 KB

  1. Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!ai-lab!zurich.ai.mit.edu!gjr
  2. From: gjr@zurich.ai.mit.edu (Guillermo J. Rozas)
  3. Newsgroups: comp.arch
  4. Subject: Re: Any use for Branch if Even/Odd ?
  5. Date: 11 Dec 92 23:07:51
  6. Organization: M.I.T. Artificial Intelligence Lab.
  7. Lines: 18
  8. Message-ID: <GJR.92Dec11230751@chamarti.ai.mit.edu>
  9. References: <endecotp.723992157@cs.man.ac.uk> <1g8ub1INN8it@agate.berkeley.edu>
  10.     <GJR.92Dec10233620@chamarti.ai.mit.edu> <lihth9INNbpo@spim.mti.sgi.com>
  11. Reply-To: gjr@zurich.ai.mit.edu
  12. NNTP-Posting-Host: chamartin.ai.mit.edu
  13. In-reply-to: jackc@vermont.mti.sgi.com's message of 11 Dec 92 20:12:25 GMT
  14.  
  15. In article <lihth9INNbpo@spim.mti.sgi.com> jackc@vermont.mti.sgi.com (Jack Choquette) writes:
  16.  
  17. |   |> Isn't this in fact how booleans are represented in BLISS, the language
  18. |   |> in which a lot of VMS was/is written?
  19. |
  20. |
  21. |   Since many programs use boolean variables for control flow but use integers
  22. |   as the boolean variable, I could see how this could be useful.  However,
  23. |   if a int value is being used as a single boolean variable it would make
  24. |   more sense to use/have an instruction like branch on zero.  It's more general
  25. |   purpose and useful.  You can use it to test boolean values as well as
  26. |   count down (to zero) loops.
  27.  
  28. The alpha has those too, but that is not the issue.  If I remember
  29. correctly, all odd integer values were considered true in BLISS, and
  30. all even values false.  Using test-for-zero for boolean tests only
  31. works if zero is the unique representation for one of the boolean
  32. values (as in C), but this is neither inherent nor clearly superior.
  33.