19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

is true if and only if there is some value in the interval x that is greater than some value in the interval y , while<br />

certainly(x > y) is true if and only if x and y are nonempty and every value in x is greater than every value in y .<br />

<strong>The</strong> operators ⊂ , ⊆ , ⊇ , and ⊃ may be used to compare sets or intervals regarded as sets.<br />

<strong>The</strong> operator ∈ may be used to test whether a value is a member of a set, list, array, interval, or range.<br />

16.8.14 Logical Operators<br />

<strong>The</strong> following binary operators may be used on boolean values:<br />

∧ AND<br />

∨ inclusive OR<br />

∨ or ⊕ or ≠ exclusive OR<br />

≡ or ↔ or = equivalence (if and only if)<br />

→ IMPLIES<br />

∧ NAND<br />

∨ NOR<br />

<strong>The</strong>se same operators may also be applied to boolean intervals to produce boolean interval results.<br />

<strong>The</strong> following operators may be used on integers to perform “bitwise” operations:<br />

∧ bitwise AND<br />

∨ bitwise inclusive OR<br />

∨ bitwise exclusive OR<br />

<strong>The</strong> prefix operator ¬ computes the bitwise NOT of an integer.<br />

16.8.15 Conditional Operators<br />

If p(x) and q(x) are expressions that produce boolean results, the expression p(x)∧:q(x) computes the logical AND<br />

of those two results by first evaluating p(x) . If the result of p(x) is true , then q(x) is also evaluated, and its result<br />

becomes the result of the entire expression; but if the result of p(x) is false , then q(x) is not evaluated, and the<br />

result of the entire expression is false without further ado. (Similarly, evaluating the expression p(x)∨:q(x) does not<br />

evaluate q(x) if the result of p(x) is true .) Contrast this with the expression p(x) ∧ q(x) (with no colon), which<br />

evaluates both p(x) and q(x) , in no specified order and possibly in parallel.<br />

136

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!