|| Logical OR operator
exp1 || exp2 Logical OR
exp1, exp2 any integral expression
The || operator performs a logical OR on exp1 and exp2; the resulting
value is 1 (TRUE) if either exp1 or exp2 or both are TRUE, and 0
(FALSE) otherwise. The operator evaluates exp1 first; if exp1 is a
non-zero value (TRUE), then exp2 is not evaluated, since the entire
expression is already true. Example:
if ((i == j) || (myfunc(k) == 0))
... /* if i == j, myfunc() isn't called */
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster