LongBool
Back to data types.
Range of values: True .. False
Memory requirement: 4 bytes or 32 bits
A data field of the LongBool data type can only contain truth values.
Assigning other values leads to compiler error messages when the program is compiled and the compilation process is aborted. This means that the executable program is not created.
The LongBool data type is used like the Boolean data type and behaves like the Boolean data type.
Declaration of a data field of type LongBool:
var
l : LongBool;Examples of assigning valid values:
l := true;
l := false;
l := 10 <> 20 ; // The result of the comparison is trueExamples of assigning invalid values:
l := 'True';
l := 'False';
l := '10 <> 20';
l := 24;The difference between the two examples is that the upper example is the assignment of literals of the type Truth value, while the assignment of the lower example is literals of the type String and the type ShortInt.
From the Free Pascal wiki, page "LongBool", as it stood on 2023-12-22 after a change by Alextpp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
