c programming style

Andrew Koenig ark at alice.UUCP
Sun Jul 21 01:39:39 AEST 1985


Joel Plutchak says:

> I submit that equating a globally recognized set of
> constants (i.e. the set of integers) with values that differ depending on
> whatever program variable happens to be nearest to them is guaranteed to be
> misleading.  

C doesn't redefine the integers; it defines addition and subtraction
on pointers.  That is: if p is a pointer to element n of an array
and i is an integer, then p+i is a pointer to element n+i of that
same array.  If p is a pointer to element n of an array and q is a
pointer to element k of the same array, then p-q is an integer and
has the same value as n-k.  What is so confusing about that???



More information about the Comp.lang.c mailing list