home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!munnari.oz.au!uniwa!DIALix!metapro!bernie
- From: bernie@metapro.DIALix.oz.au (Bernd Felsche)
- Subject: Re: Why should POINTERS be so damn hard to understand ?
- Message-ID: <1992Aug28.013449.26107@metapro.DIALix.oz.au>
- Organization: MetaPro Systems, Perth, Western Australia
- 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>
- Date: Fri, 28 Aug 92 01:34:49 GMT
- Lines: 18
-
- In <25233@castle.ed.ac.uk> chas@castle.ed.ac.uk (C Spencer) writes:
-
- >Why does a pointer need to know what it's pointing to? Surely it's just
- >an address - if there was only one kind of pointer, there wouldn't be so
- >much to learn, and be confused by.
-
- Obviously, so that when you add or subtract from it, it is
- in multiples of the object size.
-
- You will also find that some machine architectures only
- support even addresses, or worse (??) multiple of 4. With
- the advent of 64-bit architectures, I guess that it won't be
- long before they'll be multiples of 8.
- --
- +-----+ Bernd Felsche _--_|\ #include <std/disclaimer.h>
- | | | | MetaPro Systems Pty Ltd / \ bernie@metapro.DIALix.oz.au
- | | | | 328 Albany Highway, X_.--._/ Fax: +61 9 472 3337
- |m|p|s| Victoria Park, Western Australia 6100 v Phone: +61 9 362 9355
-