up previous next
boolean "or" operators
A or B (where A, B: BOOL, return BOOL)
|
This operator represents the logical disjunction of
A
and
B
.
CoCoA first evaluates
A
; if that gives
true
then the result is
true
, and
B
is not evaluated. Otherwise, if
A
gives
false
then
B
is evaluated, and its value is the final result.
/**/ Define IsUnsuitable(X)
/**/ Return X < 0 or FloorSqrt(X) >= 2^16;
/**/ EndDefine;
/**/ IsUnsuitable(-9);
true
/**/ IsUnsuitable(9);
false
|