ints vs. pointers
Geoff Kuenning
geoff at desint.UUCP
Tue Nov 13 17:58:22 AEST 1984
In article <80 at physiol.OZ> john at physiol.OZ (John Mackin) writes:
>
> If two pointers of the same type are subtracted, the result is con-
> verted (by division by the length of the object) to an int representing
> the number of objects separating the pointed-to objects.
>
>This is clearly not necessarily possible if you have (say) 32-bit pointers
>(with ALL 32 bits being address) and 16-bit ints.
Nawww. The above discussion in K&R is talking about two pointers to
similar objects in the same array. So all you have to do is limit array
sizes to 65K. (Actually, 65K * sizeof (object)).
Ridiculous, you say? Only Bozo the Clown would design such a machine, you say?
I agree.
The preceding message was brought to you by Intel Corporation. :-)
--
Geoff Kuenning
First Systems Corporation
...!ihnp4!trwrb!desint!geoff
More information about the Comp.lang.c
mailing list