Re: What is a null pointer constant?



kuyper@xxxxxxxxxx wrote:
>
> My understanding of the syntax/semantic distinction, as it
> applies to computer languages, is that the syntax is what the
> programmer writes in the code to tell the implementation what it should
> do; the semantics are the effects that the compiler is required to
> produce as a result of translating the code. Thus, according to my
> understanding, the only difference between the following three C
> statements is syntax; they all possess exactly the same required
> semantics - because they're required to produce the same exact effects:
>
> i = i+1;
> i++;
> ++i;

When one talks about semantics, it generally includes *all* the
behavior, not just the final observable results. In that case, all
three statements have different semantics because the first evaluates i
twice where the others only evaluate it once (even though that doesn't
matter in this particular case), and the second produces a different
result value than the other two (even though that value is ignored in
this particular case).

-Larry Jones

Even my FRIENDS don't do what I want. -- Calvin
.



Relevant Pages