Mail Archives: djgpp/2000/01/16/21:57:45
In article <38823564 DOT 37F9F865 AT ou DOT edu>, davidis AT ou DOT edu says...
> Hello all,
>
> I was wondering about how DJGPP would handle a very large if statement
> which contained alot of '&&' in it. Does the compiler make it so that
> the instant it hits a 'false' value it breaks out, or does it continue
> through all of tests and then does the '&&' operation(s) later? I need
> to know in order to try and optimize a program that I am writing. Any
> help you can give will be greatly appreciated. Thanks for you time.
>
> -David C.
>
This is not a compiler issue, but a C language feature as far as I know.
The compiler terminates evaluation at the first 'false' in a &&
expression, or the first 'true' in a || expression.
Probably in the C language specs, but I never bothered to look it up :)
Cheers,
RoB
- Raw text -