Name
WordBool Type
Syntax
type WordBool;
Description
The WordBool
type is a logical type whose size is
the same as the size of a Word
. A
WordBool
value is False
when
its ordinal value is zero, and it is True
when its
ordinal value is any non-zero value. WordBool
uses
-1 as the ordinal value for True
constants, e.g.,
WordBool(True)
.
Tips and Tricks
You can use a
WordBool
value anywhere you can use aBoolean
. It is most useful when interfacing with C and C++, where any non-zero integer is consideredTrue
.ByteBool
andLongBool
are similar toWordBool
, but they have different sizes.
See Also
And Keyword, Boolean Type, ByteBool Type, LongBool Type, Not Keyword, Or Keyword, Xor Keyword |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.