home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 12916 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.4 KB  |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!munnari.oz.au!uniwa!DIALix!metapro!bernie
  3. From: bernie@metapro.DIALix.oz.au (Bernd Felsche)
  4. Subject: Re: Why should POINTERS be so damn hard to understand ?
  5. Message-ID: <1992Aug28.013449.26107@metapro.DIALix.oz.au>
  6. Organization: MetaPro Systems, Perth, Western Australia
  7. References: <9208251159.AA04122@ult4> <1992Aug26.124652.9509@alw.nih.gov> <1992Aug26.183054.14146@newshub.ccs.yorku.ca> <l9nl34INNhln@almaak.usc.edu> <25233@castle.ed.ac.uk>
  8. Date: Fri, 28 Aug 92 01:34:49 GMT
  9. Lines: 18
  10.  
  11. In <25233@castle.ed.ac.uk> chas@castle.ed.ac.uk (C Spencer) writes:
  12.  
  13. >Why does a pointer need to know what it's pointing to? Surely it's just
  14. >an address - if there was only one kind of pointer, there wouldn't be so
  15. >much to learn, and be confused by.
  16.  
  17. Obviously, so that when you add or subtract from it, it is
  18. in multiples of the object size.
  19.  
  20. You will also find that some machine architectures only
  21. support even addresses, or worse (??) multiple of 4. With
  22. the advent of 64-bit architectures, I guess that it won't be
  23. long before they'll be multiples of 8.
  24. -- 
  25. +-----+ Bernd Felsche                     _--_|\  #include <std/disclaimer.h>
  26. | | | | MetaPro Systems Pty Ltd          /      \ bernie@metapro.DIALix.oz.au
  27. | | | | 328 Albany Highway,              X_.--._/         Fax: +61 9 472 3337
  28. |m|p|s| Victoria Park, Western Australia 6100  v        Phone: +61 9 362 9355
  29.