Posted by hussein on August 04, 1999 at 15:49:32:
In Reply to: Equivalence posted by Paradox on August 04, 1999 at 15:36:56:
: Is:
:
: for (int i=0; (i<10) && (test); i++) {
: do_something();
: }
:
: for (int i=0; i<10; i++) {
: if (test) do_something();
: else break;
: }
:
no.
in the first case, as soon as test fails, the loop terminates.
in the second case, the loop continues even after test fails for the first time.
---
hussein