LongBool Type
The LongBool
type is a logical type whose size is
the same as the size of a LongWord
. A
LongBool
value is False
when
its ordinal value is zero, and it is True
when its
ordinal value is any non-zero value. LongBool
uses
-1 as the ordinal value for True
constants, e.g.,
LongBool(True)
.
You can use a LongBool
value anywhere you can use
a Boolean
. It is most useful when interfacing with
C and C++, where any non-zero integer is considered
True
.
LongBool
is especially useful as a return type for
many Windows API functions, which are documented to return zero for
failure and any non-zero value for success.
ByteBool
and WordBool
are
similar to LongBool
, but they have different
sizes.