Re: C/C++ Ambiguity in Order of Evaluation
- From: Mark McIntyre <markmcintyre@xxxxxxxxxxx>
- Date: Sun, 24 Jun 2007 20:53:20 +0100
On Sun, 24 Jun 2007 07:40:22 +0200, in comp.lang.c , "¬a\\/b" <al@xxx>
wrote:
ev=evalute
what about
t1=ev(a); t2=ev(b); t3=t1*t2; t4=ev(c); t5=t3+t4; x=t5;
the semicolons introduce sequence points.
what about x= ++a() * --b() + ++c();
Error - you can't increment a function.
t1=++ev(a()); t2=--ev(b()); t3=t1*t2; t4=++ev(c()); t5=t3+t4; x=t5;
Ditto.
--
Mark McIntyre
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.
- References:
- C/C++ Ambiguity in Order of Evaluation
- From: Rasjid
- Re: C/C++ Ambiguity in Order of Evaluation
- From: Army1987
- Re: C/C++ Ambiguity in Order of Evaluation
- From: ¬a\\/b
- C/C++ Ambiguity in Order of Evaluation
- Prev by Date: Re: casts and lvalues
- Next by Date: Re: Very Simple, Minimalist Technique For OOP in C...
- Previous by thread: Re: C/C++ Ambiguity in Order of Evaluation
- Next by thread: Re: C/C++ Ambiguity in Order of Evaluation
- Index(es):
Relevant Pages
|