Mail Archives: djgpp/1997/08/13/21:19:55
Teemu Ikonen wrote:
> > Is it safe to assume that the expression
> >
> > if(first_function()==OK && second_function()==OK &&
> > third_function()==OK) return(OK);
> >
> > will be evaluated from left to right?
>
> Theoretically no, in practise it could work.
The && operator is _guaranteed_ to be short circuiting since the days of
traditional C. Please don't add confusion to an otherwise simple issue.
--
Erik Max Francis, &tSftDotIotE / email / mailto:max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Love is not love which alters / when it alteration finds."
/ William Shakespeare, _Sonnets_, 116
- Raw text -