home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / misc / 4049 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
  3. From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  4. Subject: Re: Safety. Was: Re: Pointers
  5. Message-ID: <BzD525.Ayv@mentor.cc.purdue.edu>
  6. Sender: news@mentor.cc.purdue.edu (USENET News)
  7. Organization: Purdue University Statistics Department
  8. References: <1992Dec16.164821.19079@walter.bellcore.com>
  9. Date: Wed, 16 Dec 1992 17:39:40 GMT
  10. Lines: 31
  11.  
  12. In article <1992Dec16.164821.19079@walter.bellcore.com> dnew@thumper.bellcore.com (Darren New) writes:
  13.  
  14.             .................
  15.  
  16. >>     use_double(c,d)
  17.  
  18. >> where, for example, c and d would be 32-bit objects and double is 64-bit.
  19.  
  20. >This is a trivial modification, using a union with two 32-bit objects
  21. >overlapping one 64-bit object.
  22.  
  23. >However, C cannot choose different functions based on that their value
  24. >is returned as.  What should it do if you say
  25.  
  26. >process(use_double(c,d))
  27.  
  28. >and you haven't declared what types "process" uses returns.  It's a tiny
  29. >amount of work to use different functions depending on what you want to
  30. >pass and what you want back, compared to actually getting it to work.
  31.  
  32. My idea about "use" is much simpler.  The expression use_double(...), as
  33. I intend it, means that the bit pattern, or concatenated bit pattern, 
  34. described in the parentheses is to be now used as a double number in
  35. any application.  Therefore, in   process(use_double(...)), process just
  36. assumes that what is presented to it is a double, just as the cast to
  37. double declares that the result is double.
  38. -- 
  39. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  40. Phone: (317)494-6054
  41. hrubin@snap.stat.purdue.edu (Internet, bitnet)  
  42. {purdue,pur-ee}!snap.stat!hrubin(UUCP)
  43.