UInt8
Back to data types.
Range of values: 0 .. 255
Memory requirement: 1 byte or 8 bit
A data field of the UInt8 data type can only contain positive integer values.
Assigning other values leads to compiler error messages when the program is compiled and the compilation process is aborted. That is, the executable program is not created.
Definition of a data field of type UInt8:
var
ui8 : uint8;Examples of assigning valid values:
ui8 := 0;
ui8 := 255;Examples of assigning invalid values:
ui8 := '0';
ui8 := '255';The difference between the two examples is that the upper example is the assignment of literals of the type Integer, while the assignment of the lower example is literals of the type String.
From the Free Pascal wiki, page "UInt8", as it stood on 2020-03-02 after a change by Trev, 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.
