On Feb 11, 9:04 am, "Bill Leary" <Bill_Le...@msn.com> wrote:
> "Keith Thompson" <ks...@mib.org> wrote in message
>
> news:...
>
>
>
> > "Bill Leary" <Bill_Le...@msn.com> writes:
> >> The line
> >> int dummy = printf("Hello, world\n");
>
> >> (and it's like) I've been interpreting as
>
> >> int dummy;
> >> printf("Hello, world\n");
>
> >> for all these years. That is, I always saw it as a short hand form of
> >> a declaration and code.
>
> > Actually, it's equivalent to:
>
> > int dummy;
> > dummy = printf("Hello, world\n");
>
> Thanks. That's what I meant. I've never been any damn good at proof
> reading my own writing.
>
> > The question is what the word "code" means. I see no reason to limit
> > it to C statements. The real point is that, since there seems to be
> > no consensus on what the word "code" really means, it's better to use
> > an unambiguous term. If you want to talk about statements, call them
> > "statements".
>
> I'll buy that. When I first wrote the above, I actually typed "...short
> hand form of a declaration and a statement." then changed it to "code" to
> conform with what I thought folks were using here. I think my first impulse
> there was the more correct one.
>
> - Bill
I have to agree, the declaration is "int dummy" and the code is
"printf("Hello, world\n");". But, we deal in syntax, not semantics.
I guess this yet another example of "six of one, half a dozen of
another."
cj
|