Perhaps guess equals guess or guess?
Originally Posted by sfff
Note that logical OR will short-circuit in this case. An example, of what I mean:
Note that "foo()" wasn't called for every iteration (only once x < 5 became false).
zac@neux:code (1) $ gcc ss.c -o ss
zac@neux:code (1) $ ./ss
loops = 14, foo() = 11
zac@neux:code (1) $ cat ss.c
static int x = 0;
int x = 0,
loops = 0;
while(x < 5 || foo() < 10)
/* Don't expect foo() to be called "loops" times */
printf("loops = %d, foo() = %d\n", loops, foo());