Name
LongBool Type
Syntax
type LongBool;
Description
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).
Tips and Tricks
You can use a
LongBoolvalue anywhere you can use aBoolean. It is most useful when interfacing with C and C++, where any non-zero integer is consideredTrue.LongBoolis 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.ByteBoolandWordBoolare similar toLongBool, but they have different sizes.
See Also
| And Keyword, Boolean Type, ByteBool Type, Not Keyword, Or Keyword, WordBool Type, Xor Keyword |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access