Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: 10[25]==35? Really?
Message-ID: <1991Feb25.163616.27422@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <25694@netcom.COM>
Date: Mon, 25 Feb 1991 16:36:16 GMT

In article <25694@netcom.COM> avery@netcom.COM (Avery Colter) writes:
>With all this about the #define X1 -10, I find it interesting that
>indexing a constant yields the sum of the constant and the number inside
>the brackets.

It shouldn't.  The definition of a[b] is that it acts like *(a+b) [ignoring
issues of parentheses and operator precedence].  Note the "*" on the front.
-- 
"But this *is* the simplified version   | Henry Spencer @ U of Toronto Zoology
for the general public."     -S. Harris |  henry@zoo.toronto.edu  utzoo!henry
