Difference between revisions of "QWord"
From Lazarus wiki
Jump to navigationJump to search (Created page with "{{Qword}} Value range: 0 .. 18446744073709551615 Memory requirement: 8 bytes or 64 bits Feature: The data type Qword in the data field can only have posit...") |
(Expanded wth English translation of German page) |
||
Line 1: | Line 1: | ||
{{Qword}} | {{Qword}} | ||
− | |||
− | + | Back to [[Data type|data types]]. | |
− | + | ||
+ | Range of values: 0 .. 18446744073709551615 | ||
+ | |||
+ | Memory requirement: 8 bytes or 64 bits | ||
+ | |||
+ | A data field of the '''Qword''' data type can only take unsigned 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 Qword: | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | var | ||
+ | qw : Qword; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Examples of assigning valid values: | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | qw := 0; | ||
+ | qw := 255; | ||
+ | qw := 65535; | ||
+ | qw := 4294967295; | ||
+ | qw := 18446744073709551615; | ||
+ | |||
+ | Examples of assigning invalid values: | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | qw := '0'; | ||
+ | qw := '255'; | ||
+ | qw := '65535'; | ||
+ | qw := '4294967295'; | ||
+ | qw := '18446744073709551615'; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 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]]. |
Revision as of 01:27, 24 February 2020
│
Deutsch (de) │
English (en) │
français (fr) │
Back to data types.
Range of values: 0 .. 18446744073709551615
Memory requirement: 8 bytes or 64 bits
A data field of the Qword data type can only take unsigned 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 Qword:
var
qw : Qword;
Examples of assigning valid values:
qw := 0;
qw := 255;
qw := 65535;
qw := 4294967295;
qw := 18446744073709551615;
Examples of assigning invalid values:
<syntaxhighlight lang=pascal>
qw := '0';
qw := '255';
qw := '65535';
qw := '4294967295';
qw := '18446744073709551615';
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.