Mail Archives: djgpp/1999/07/31/23:37:07
It's a required C (C++ ?) behaviour. In an and statement, the first
condition is evaluated, and the second one only if the first is true. The
same hold true for OR: if the first expression is true, it won't bother to
evaluate all the others, if not, it'll go one by one from left to rigth.
At 01:18 AM 7/9/98 +0300, you wrote:
>let's say we ahve the following expresion:
>if((a)&&(b)) {}
>
>the compiler evaluates a or b first?
>and does it optimize the evaluation, so if the first of them in 0, don't
>bother about the other one?? (0&&1==0)
>
>
>
- GodOfWar
Computers are getting faster, smaller and cheaper with time. Does that mean
that Microsoft invented time travel ?
- Raw text -