Posted by DarkTerritory on August 04, 1999 at 17:08:52:
In Reply to: Re: Equivalence posted by hussein on August 04, 1999 at 15:49:32:
: :
: : for (int i=0; (i<10) && (test); i++) {
: : do_something();
: : }
: :
: : for (int i=0; i<10; i++) {
: : if (test) do_something();
: : else break;
: : }
: :
: in the second case, the loop continues even after test fails for the first time.
Doesn't the "else break" cause the loop to die in the event test fails? If I am mistaken, what does it do?
-DT