boolean¶
fun boolean::random(P?: number): booleanReturns a random boolean that has probability
Pof beingtrue. If omitted,Pdefaults to0.5.meth !!(Value: any): booleanReturns
trueifValueis notnil, otherwise returnsfalse.type booleanA boolean value (either
trueorfalse).meth boolean(String: string): boolean | errorReturns
trueifStringequals"true"(ignoring case). ReturnsfalseifStringequals"false"(ignoring case). Otherwise returns an error.meth !(Bool: boolean): booleanReturns the logical inverse of
Boolmeth (Arg₁: boolean) != (Arg₂: boolean): boolean | nilReturns
Arg₂ifArg₁ != Arg₂andnilotherwise.true != true :> nil true != false :> false false != true :> true false != false :> nil
meth -(Bool: boolean): booleanReturns the logical inverse of
Boolmeth (Bool₁: boolean) /\ (Bool₂: boolean, ...): booleanReturns the logical and of
Bool₁andBool₂.true /\ true :> true true /\ false :> false false /\ true :> false false /\ false :> false
meth (Arg₁: boolean) < (Arg₂: boolean): boolean | nilReturns
Arg₂ifArg₁ < Arg₂andnilotherwise.true < true :> nil true < false :> nil false < true :> true false < false :> nil
meth (Arg₁: boolean) <= (Arg₂: boolean): boolean | nilReturns
Arg₂ifArg₁ <= Arg₂andnilotherwise.true <= true :> true true <= false :> nil false <= true :> true false <= false :> false
meth (Bool₁: boolean) <> (Bool₂: boolean): integerReturns
-1,0or1depending on whetherBool₁is less than, equal to or greater thanBool₂.trueis considered greater thanfalse.meth (Arg₁: boolean) = (Arg₂: boolean): boolean | nilReturns
Arg₂ifArg₁ == Arg₂andnilotherwise.true = true :> true true = false :> nil false = true :> nil false = false :> false
meth (Arg₁: boolean) > (Arg₂: boolean): boolean | nilReturns
Arg₂ifArg₁ > Arg₂andnilotherwise.true > true :> nil true > false :> false false > true :> nil false > false :> nil
meth (Bool₁: boolean) >< (Bool₂: boolean): booleanReturns the logical xor of
Bool₁andBool₂.true >< true :> false true >< false :> true false >< true :> true false >< false :> false
meth (Arg₁: boolean) >= (Arg₂: boolean): boolean | nilReturns
Arg₂ifArg₁ >= Arg₂andnilotherwise.true >= true :> true true >= false :> false false >= true :> nil false >= false :> false
meth (Bool₁: boolean) \/ (Bool₂: boolean, ...): booleanReturns the logical or of
Bool₁andBool₂.true \/ true :> true true \/ false :> true false \/ true :> true false \/ false :> false
meth (Buffer: string::buffer):append(Value: boolean)Appends
"true"or"false"toBuffer.