Difference between revisions of "Int64"

From Lazarus wiki
Jump to navigationJump to search
(Expanded page with translated content from German page)
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{Int64}}
 
{{Int64}}
  
 
+
'''int64''' is an integer type that is represented with 64bit. It's range of values: -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807 (that is
Back to [[Data type|data types]].
+
<math>\left\{n \in \mathbb{Z} \: \mid -\left(2^{63}\right) \leq n < 2^{63}\right\}</math>)
 
 
 
 
Range of values: -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807 (-2<sup>63</sup> .. 2<sup>63</sup>)
 
  
 
Memory requirement: 8 bytes or 64 bits
 
Memory requirement: 8 bytes or 64 bits

Revision as of 13:25, 24 November 2020

Deutsch (de) English (en) français (fr) русский (ru)

int64 is an integer type that is represented with 64bit. It's range of values: -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807 (that is [math]\displaystyle{ \left\{n \in \mathbb{Z} \: \mid -\left(2^{63}\right) \leq n \lt 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:

  var 
    i64 : Int64;

Examples of assigning valid values:

    i64 := - 9223372036854775808;
    i64 := 0;
    i64 := 9223372036854775807;

Examples of assigning invalid values:

    i64 := '-9223372036854775808';
    i64 := '0';
    i64 := '9223372036854775807';

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.


navigation bar: data types
simple data types

boolean byte cardinal char currency double dword extended int8 int16 int32 int64 integer longint real shortint single smallint pointer qword word

complex data types

array class object record set string shortstring