|
|
(5 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
− | {{Int64}}
| + | #REDIRECT [[Integer]] |
− | | |
− | | |
− | Back to [[Data type|data types]].
| |
− | | |
− | | |
− | Range of values: -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807 (that is
| |
− | <math>\left\{n \in \mathbb{Z} \: \mid -\left(2^{63}\right) \leq n < 2^{63}\right\}</math>)
| |
− | | |
− | Memory requirement: 8 bytes or 64 bits
| |
− | | |
− | A data field of the Int64 data type can only take integer values with and without sign.
| |
− | 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 Int64:
| |
− | | |
− | <syntaxhighlight lang=pascal>
| |
− | var
| |
− | i64 : Int64;
| |
− | </syntaxhighlight>
| |
− | | |
− | Examples of assigning valid values:
| |
− | | |
− | <syntaxhighlight lang=pascal>
| |
− | i64 := - 9223372036854775808;
| |
− | i64 := 0;
| |
− | i64 := 9223372036854775807;
| |
− | </syntaxhighlight>
| |
− | | |
− | Examples of assigning invalid values:
| |
− | | |
− | <syntaxhighlight lang=pascal>
| |
− | i64 := '-9223372036854775808';
| |
− | i64 := '0';
| |
− | i64 := '9223372036854775807';
| |
− | </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]].
| |
− | | |
− | {{Data types}}
| |