home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / misc / 3833 < prev    next >
Encoding:
Text File  |  1992-11-22  |  2.2 KB  |  47 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
  3. From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  4. Subject: Re: languages which allow the introduction of new operators
  5. Message-ID: <By4EM9.7qn@mentor.cc.purdue.edu>
  6. Sender: news@mentor.cc.purdue.edu (USENET News)
  7. Organization: Purdue University Statistics Department
  8. References: <Bxz8px.FBx@mentor.cc.purdue.edu> <722322705@sheol.UUCP>
  9. Date: Sun, 22 Nov 1992 13:54:08 GMT
  10. Lines: 35
  11.  
  12. In article <722322705@sheol.UUCP> throopw@sheol.UUCP (Wayne Throop) writes:
  13.  
  14.             ...................
  15.  
  16.                   e can communicate binary integers across machines
  17. >: and implementations; the much used notation 0ddddd for octal and
  18. >: 0xdddddddd for hexadecimal, bad as they are, do this explicitly.
  19. >
  20. >So, what does this have to do with the semantic model of the language?
  21. >What prevents one from converting the floats to binary representation
  22. >in ascii, transmitting that, reading the result, and doing the
  23. >inverse conversion?
  24.  
  25. This will not do the job.   The binary representations of floats on
  26. CRAYs, CYBERs, VAXen, RS/6000s, etc., are all different.  Also, these
  27. are only the representations of floats within the precision of the
  28. machine.  In addition, there is NO remotely standard fixed-point 
  29. binary representation of non-integers which can be communicated.
  30.  
  31. With integers, we can transmit integers of arbitrary length in decimal,
  32. octal, or hexadecimal without having any idea of how the hardware/software
  33. of the machine handles it.  We have corresponding facilities for fixed-
  34. point and floating-point decimals.  If someone types in pi to 200 digits,
  35. there is no problem in understanding what is communicated, whether fixed-point
  36. or floating-point.  But now how do you do this if one is not interested in
  37. communicating the decimal representation, but the hex or octal?  
  38.  
  39. If one is writing a program, the non-integral constants often should be
  40. given in octal or hex for various reasons.  This means that the language
  41. in which that program is written must have some way to read them.
  42. -- 
  43. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  44. Phone: (317)494-6054
  45. hrubin@snap.stat.purdue.edu (Internet, bitnet)  
  46. {purdue,pur-ee}!snap.stat!hrubin(UUCP)
  47.