Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Boolean Source Code
 previous   up   next 

Types
boolean
Logical type, which consists of the two truth values TRUE and FALSE.

boolean

const type: boolean

Logical type, which consists of the two truth values TRUE and FALSE.


Constant Summary
boolean
FALSE
FALSE is one of the two Boolean truth values.
boolean
TRUE
TRUE is one of the two Boolean truth values.

Operator Summary
boolean
not (in boolean: boolValue)
Negate a boolean value.
boolean
(in boolean: boolValue1) and (ref func boolean: boolValue2)
Logical and for two boolean values.
boolean
(in boolean: boolValue1) or (ref func boolean: boolValue2)
Inclusive logical or for two boolean values.
boolean
(in boolean: boolValue1) = (in boolean: boolValue2)
Check if two boolean values are equal.
boolean
(in boolean: boolValue1) <> (in boolean: boolValue2)
Check if two boolean values are not equal.
boolean
(in boolean: boolValue1) < (in boolean: boolValue2)
Check if boolValue1 is less than boolValue2.
boolean
(in boolean: boolValue1) > (in boolean: boolValue2)
Check if boolValue1 is greater than boolValue2.
boolean
(in boolean: boolValue1) <= (in boolean: boolValue2)
Check if boolValue1 is less than or equal to boolValue2.
boolean
(in boolean: boolValue1) >= (in boolean: boolValue2)
Check if boolValue1 is greater than or equal to boolValue2.
boolean
(attr boolean) conv (in integer: number)
Convert an integer to a boolean value.
boolean
(attr boolean) parse (in string: stri)
Convert a string to a boolean value.

Function Summary
integer
compare (in boolean: aBoolean1, in boolean: aBoolean2)
Compare two boolean values..
integer
hashCode (in boolean: aBoolean)
Compute the hash value of a boolean value.
integer
ord (in boolean: boolValue)
Convert to integer.
boolean
succ (ref boolean: boolValue)
Successor of a boolean value.
boolean
pred (ref boolean: boolValue)
Predecessor of a boolean value.
void
incr (inout boolean: boolValue)
Increment a boolean value.
void
decr (inout boolean: boolValue)
Decrement a boolean value.
string
str (in boolean: aBool)
Convert a boolean value to a string.
boolean
rand (in boolean: low, in boolean: high)
Compute pseudo-random boolean value in the range [low, high].

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. When 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. When 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 boolean: (attr boolean) conv (in integer: number)

Convert an integer to a boolean value.

Returns:
TRUE when number is odd, FALSE otherwise.

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 - When the string is not equal to "TRUE" or "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 when boolValue is FALSE and 1 when boolValue is TRUE.

succ

const func boolean: succ (ref boolean: boolValue)

Successor of a boolean value.

Returns:
TRUE, when the boolean value is FALSE.

pred

const func boolean: pred (ref boolean: boolValue)

Predecessor of a boolean value.

Returns:
FALSE, when the boolean value is TRUE.

incr

const proc: incr (inout boolean: boolValue)

Increment a boolean value.


decr

const proc: decr (inout boolean: boolValue)

Decrement a boolean value.


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" when aBool is TRUE, "FALSE" otherwise.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

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 number such that low <= rand(low, high) and rand(low, high) <= high holds.
Raises:
RANGE_ERROR - The range is empty (low > high holds).


 previous   up   next