Re: What is a null pointer constant?
- From: lawrence.jones@xxxxxxx
- Date: Thu, 15 Dec 2005 23:13:01 GMT
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
.
- Follow-Ups:
- Re: What is a null pointer constant?
- From: Francis Glassborow
- Re: What is a null pointer constant?
- References:
- Re: What is a null pointer constant?
- From: Tim Rentsch
- Re: What is a null pointer constant?
- From: Jordan Abel
- Re: What is a null pointer constant?
- From: kuyper
- Re: What is a null pointer constant?
- From: David R Tribble
- Re: What is a null pointer constant?
- From: kuyper
- Re: What is a null pointer constant?
- From: Christian Bau
- Re: What is a null pointer constant?
- From: kuyper
- Re: What is a null pointer constant?
- Prev by Date: Re: Newbie quiestion... clearing the scr :S
- Next by Date: Re: What is a null pointer constant?
- Previous by thread: Re: What is a null pointer constant?
- Next by thread: Re: What is a null pointer constant?
- Index(es):
Relevant Pages
|