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 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.

See Also

And Keyword, Boolean Type, ByteBool 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