Name

Boolean Type

Syntax

type Boolean = (False, True);

Description

The Boolean type is an enumerated type with two values. All comparison and logical operators produce a Boolean result. Conditions for if, while, and repeat-until statements must be of type Boolean or one of the other logical types (ByteBool, WordBool, or LongBool).

Tips and Tricks

Do not cast an integer value to Boolean. If you want compatibility with C and C++, where any non-zero integer is considered True, use the ByteBool, WordBool, or LongBool type instead of Boolean. The three other types have the same semantics, but different sizes. Unlike Boolean, the other three types interpret any non-zero ordinal value as True.

See Also

And Keyword, ByteBool Type, LongBool Type, Not Keyword, Or Keyword, WordBool Type, Xor Keyword
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset