Name

ByteBool Type

Syntax

type ByteBool;

Description

The ByteBool type is a logical type whose size is the same as the size of a Byte. A ByteBool value is False when its ordinal value is zero, and it is True when its ordinal value is any non-zero value. ByteBool uses -1 as the ordinal value for True constants, e.g., ByteBool(True).

Tips and Tricks

  • You can use a ByteBool 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.

  • WordBool and LongBool are similar to ByteBool, but they have different sizes.

See Also

And Keyword, Boolean Type, LongBool Type, Not Keyword, Or Keyword, WordBool Type, 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.