home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 12830 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.7 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!ucbvax!mtxinu!sybase!hamish
  2. From: hamish@sybase.com (Just Another Deckchair on the Titanic)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Pointer/address reluctance
  5. Message-ID: <22772@sybase.sybase.com>
  6. Date: 25 Aug 92 16:44:35 GMT
  7. References: <10444.610.uupcb@spacebbs.com>
  8. Sender: news@Sybase.COM
  9. Distribution: na
  10. Organization: Sybase Inc, Emeryville CA USA
  11. Lines: 34
  12.  
  13. In article <10444.610.uupcb@spacebbs.com> ted.jensen@spacebbs.com (Ted Jensen) writes:
  14.     [...]
  15. <IMHO, I find it much easier to think of an address as a value
  16. >which identifies a location in memory, and a pointer as a
  17. <variable designed to hold a value which identifies a location in
  18. >memory, i.e. an address.
  19. <
  20. >Based on the above definitions (which I feel few could argue
  21. <with), a pointer is an lvalue whereas an address is not.  Thus,
  22. >there is a distinct difference between the two.  What is
  23. <frustrating is when a writer states that a function or
  24. >calculation "returns a pointer".
  25. <
  26. >The problem, of course, stems from the failure to distinguish
  27. <between an integer variable, and an integer value, a float
  28. >variable and a float value, etc.  Consider the following:
  29.  
  30.     [rest of posting deleted]
  31.  
  32. Erm, I'm sure I've missed *something* here, but if you want to use your
  33. own integer value / integer variable analogy, surely you want to use:
  34.  
  35.     pointer value / pointer variable
  36.  
  37. in this context?
  38.  
  39. In that case, of course, the word "address" disappears (as does most of
  40. the rest of your article and the analysis therein)....
  41.  
  42.  
  43.     Hamish
  44. ---------------------------------------------------------------------------
  45. Hamish Reid       Sybase Inc, 6475 Christie Ave, Emeryville CA 94608 USA
  46. +1 510 596-3917   hamish@netcom.com  hamish@sybase.com  uunet!sybase!hamish
  47.