home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12439 < prev    next >
Encoding:
Text File  |  1992-08-17  |  2.1 KB  |  52 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!sasghm
  3. From: sasghm@theseus.unx.sas.com (Gary Merrill)
  4. Subject: Re: Pointer/address reluctance
  5. Originator: sasghm@theseus.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <Bt53qx.Brp@unx.sas.com>
  8. Date: Mon, 17 Aug 1992 18:08:57 GMT
  9. References: <l8kteaINNp2c@exodus.Eng.Sun.COM> <1992Aug14.173255.10548@wyvern.twuug.com> <l8ojbqINN900@exodus.Eng.Sun.COM>
  10. Nntp-Posting-Host: theseus.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 38
  13.  
  14.  
  15. In article <l8ojbqINN900@exodus.Eng.Sun.COM>, linden@positive.Eng.Sun.COM (Peter van der Linden) writes:
  16.  
  17. |> And I find it implausible in the extreme that "an address 
  18. |> constant is not an address".   Does this mean that a case
  19. |> would be made that an integer constant is not an integer?
  20.  
  21. Of course an integer constant is not an integer.  An integer constant
  22. is an expression in the programming language -- it is a *linguistic*
  23. entity (note that it is defined in the "syntax" portion of the
  24. standard, for example).  An integer is a mathematical object (the
  25. nature of which I will not get into here).  The integer constant
  26. *denotes* ("stands for", if you like) the integer.  What we are
  27. talking about here is simply the difference between a numeral and
  28. a number.  Consider, for example the following:
  29.  
  30.     An address constant in C begins with an ampersand.
  31.         [true]
  32.  
  33. but
  34.  
  35.     An address begins with an ampersand.
  36.         [ridiculous]
  37.  
  38.  
  39. |> We have an "address-of" operator, rather than a "pointed-to" operator.
  40. |> It appears that addresses are in the standard however informally.
  41. |> I suspect that people are distinguishing between "pointer"
  42. |> and "address" out of a misguided desire to over-generalize.
  43.  
  44. No.  Rather it is out of a desire to provide as precise a semantics
  45. as possible while not imposing arbitrary constraints on implementing
  46. the language on possible future architectures.
  47.  
  48. -- 
  49. Gary H. Merrill  [Principal Systems Developer, C Compiler Development]
  50. SAS Institute Inc. / SAS Campus Dr. / Cary, NC  27513 / (919) 677-8000
  51. sasghm@theseus.unx.sas.com ... !mcnc!sas!sasghm
  52.