Libraries |
|
Boolean | Source Code |
|
|
Types | ||||
|
Constant Summary | |||||
boolean |
| ||||
boolean |
|
Operator Summary | |||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
integer |
| ||||
boolean |
| ||||
boolean |
| ||||
aType |
|
Function Summary | |||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
boolean |
| ||||
boolean |
| ||||
boolean |
| ||||
void |
| ||||
void |
| ||||
string |
| ||||
string |
| ||||
boolean |
| ||||
boolean |
|
Constant Detail |
FALSE
const boolean: FALSE
-
FALSE is one of the two Boolean truth values. The negation of FALSE is TRUE.
TRUE
const boolean: TRUE
-
TRUE is one of the two Boolean truth values. The negation of TRUE is FALSE.
Operator Detail |
not
const func boolean: not (in boolean: boolValue)
-
Negate a boolean value.
- Returns:
- TRUE if boolValue is FALSE, FALSE otherwise.
and
const func boolean: (in boolean: boolValue1) and (ref func boolean: boolValue2)
-
Logical and for two boolean values. The logical and operator works strictly left to right. If the result can be determined after the evaluation of boolValue1 the right operand (boolValue2) is not evaluated.
- Returns:
- TRUE if boolValue1 is TRUE and boolValue2 is TRUE, FALSE otherwise.
or
const func boolean: (in boolean: boolValue1) or (ref func boolean: boolValue2)
-
Inclusive logical or for two boolean values. The logical or operator works strictly left to right. If the result can be determined after the evaluation of boolValue1 the right operand (boolValue2) is not evaluated.
- Returns:
- TRUE if boolValue1 is TRUE or boolValue2 is TRUE (or both are true), FALSE otherwise.
=
const func boolean: (in boolean: boolValue1) = (in boolean: boolValue2)
-
Check if two boolean values are equal.
- Returns:
- TRUE if the two boolean values are equal, FALSE otherwise.
<>
const func boolean: (in boolean: boolValue1) <> (in boolean: boolValue2)
-
Check if two boolean values are not equal.
- Returns:
- FALSE if the two boolean values are equal, TRUE otherwise.
<
const func boolean: (in boolean: boolValue1) < (in boolean: boolValue2)
-
Check if boolValue1 is less than boolValue2.
- Returns:
- TRUE if boolValue1 is FALSE and boolValue2 is TRUE, FALSE otherwise.
>
const func boolean: (in boolean: boolValue1) > (in boolean: boolValue2)
-
Check if boolValue1 is greater than boolValue2.
- Returns:
- TRUE if boolValue1 is TRUE and boolValue2 is FALSE, FALSE otherwise.
<=
const func boolean: (in boolean: boolValue1) <= (in boolean: boolValue2)
-
Check if boolValue1 is less than or equal to boolValue2.
- Returns:
- TRUE if boolValue1 is FALSE or boolValue2 is TRUE, FALSE otherwise.
>=
const func boolean: (in boolean: boolValue1) >= (in boolean: boolValue2)
-
Check if boolValue1 is greater than or equal to boolValue2.
- Returns:
- TRUE if boolValue1 is TRUE or boolValue2 is FALSE, FALSE otherwise.
conv
const func integer: (attr integer) conv (in boolean: boolValue)
-
Conversion from boolean to integer.
- Returns:
- 0 if boolValue is FALSE and 1 if boolValue is TRUE.
conv
const func boolean: (attr boolean) conv (in integer: number)
-
Convert an integer to a boolean value.
- Returns:
- FALSE if number is 0, TRUE if number is 1.
- Raises:
- RANGE_ERROR - If number is neither 0 nor 1.
parse
const func boolean: (attr boolean) parse (in string: stri)
-
Convert a string to a boolean value.
- Returns:
- the boolean result of the conversion.
- Raises:
- RANGE_ERROR - If the string is not equal to "TRUE" or "FALSE".
?
const func aType: (in boolean: condition) ? (ref func aType: thenValue) : (ref func aType: elseValue)
-
Ternary operator condition ? thenValue : elseValue
- Returns:
- thenValue if condition is TRUE, and elseValue if condition is FALSE.
Function Detail |
compare
const func integer: compare (in boolean: aBoolean1, in boolean: aBoolean2)
-
Compare two boolean values..
- Returns:
- -1, 0 or 1 if the first argument is considered to be respectively less than, equal to, or greater than the second.
hashCode
const func integer: hashCode (in boolean: aBoolean)
-
Compute the hash value of a boolean value.
- Returns:
- the hash value.
ord
const func integer: ord (in boolean: boolValue)
-
Convert to integer.
- Returns:
- 0 if boolValue is FALSE and 1 if boolValue is TRUE.
integer
const func integer: integer (in boolean: boolValue)
-
Convert to integer.
- Returns:
- 0 if boolValue is FALSE and 1 if boolValue is TRUE.
boolean
const func boolean: boolean (in integer: number)
-
Convert an integer to a boolean value.
- Returns:
- FALSE if number is 0, TRUE if number is 1.
- Raises:
- RANGE_ERROR - If number is neither 0 nor 1.
succ
const func boolean: succ (ref boolean: boolValue)
-
Successor of a boolean value.
succ(FALSE) returns TRUE succ(TRUE) raises RANGE_ERROR
- Returns:
- TRUE, if the boolean value is FALSE.
- Raises:
- RANGE_ERROR - If the boolean value is TRUE.
pred
const func boolean: pred (ref boolean: boolValue)
-
Predecessor of a boolean value.
pred(FALSE) raises RANGE_ERROR pred(TRUE) returns FALSE
- Returns:
- FALSE, if the boolean value is TRUE.
- Raises:
- RANGE_ERROR - If the boolean value is FALSE.
str
const func string: str (in boolean: aBool)
-
Convert a boolean value to a string. The boolean value is converted to the string "TRUE" or "FALSE.
- Returns:
- "TRUE" if aBool is TRUE, "FALSE" otherwise.
- Raises:
- MEMORY_ERROR - Not enough memory to represent the result.
literal
const func string: literal (in boolean: aBool)
-
Convert a boolean value to a boolean literal. The boolean value is converted to the string "TRUE" or "FALSE.
- Returns:
- "TRUE" if aBool is TRUE, "FALSE" otherwise.
- Raises:
- MEMORY_ERROR - Not enough memory to represent the result.
boolean
const func boolean: boolean (in string: stri)
-
Convert a string to a boolean value.
- Returns:
- the boolean result of the conversion.
- Raises:
- RANGE_ERROR - If the string is not equal to "TRUE" or "FALSE".
rand
const func boolean: rand (in boolean: low, in boolean: high)
-
Compute pseudo-random boolean value in the range [low, high]. The random values are uniform distributed.
- Returns:
- a random value such that low <= rand(low, high) and rand(low, high) <= high holds.
- Raises:
- RANGE_ERROR - The range is empty (low > high holds).
|
|