19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

opr =(self,other: Boolean):Boolean<br />

getter hashCode(): N64<br />

toString():String<br />

end<br />

test testData[ ] = {false,true }<br />

24.1.1 coercion bool b(x:BooleanLiteralb)<br />

A boolean literal can always serve as a Boolean value.<br />

24.1.2 oprjuxtaposition (self,other: Boolean):Boolean<br />

Juxtaposition of boolean expressions is equivalent to using the logical AND operator ∧ .<br />

24.1.3 opr ∧(self,other: Boolean):Boolean<br />

24.1.4 opr ∧(self,other: () → Boolean):Boolean<br />

<strong>The</strong> logical AND operator ∧ ( AND ) returns true if both arguments are true ; otherwise it returns false .<br />

<strong>The</strong> conditional logical AND operator ∧ : ( AND: ) examines its first argument; if it is false , the result is false , and<br />

the second argument (a thunk) is not evaluated. But if the first argument is true , the second argument is evaluated and<br />

its result becomes the result of the conditional logical AND operator expression.<br />

24.1.5 opr ∨(self,other: Boolean):Boolean<br />

24.1.6 opr ∨(self,other: () → Boolean):Boolean<br />

<strong>The</strong> logical OR operator ∨ ( OR ) returns false if both arguments are false ; otherwise it returns true .<br />

<strong>The</strong> conditional logical OR operator ∨ : ( OR: ) examines its first argument; if it is true , the result is true , and the<br />

second argument (a thunk) is not evaluated. But if the first argument is false , the second argument is evaluated and its<br />

result becomes the result of the conditional logical OR operator expression.<br />

24.1.7 opr ¬(self): Boolean<br />

<strong>The</strong> logical NOT operator ¬ ( NOT ) returns true if its argument is false ; it returns false if its argument is true .<br />

24.1.8 opr ∨(self,other: Boolean):Boolean<br />

24.1.9 opr ⊕(self,other: Boolean):Boolean<br />

<strong>The</strong> logical exclusive OR operator ∨ ( XOR ) returns true if the arguments are different, one being true and the other<br />

false ; it returns false if both arguments are true or both arguments are false .<br />

<strong>The</strong> operator ⊕ ( OPLUS ) does the same thing as ∨ .<br />

183

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

Saved successfully!

Ooh no, something went wrong!