Name

Int64 Type

Syntax

type Int64 = -9223372036854775808..9223372036854775807;

Description

The Int64 type is a 64-bit signed integer type.

Tips and Tricks

  • Use Int64 instead of the Comp type. Int64 does not depend on the floating-point unit or the precision set in the floating-point control word. Also, Int64 supports integer operators such as shl or shr.

  • An integer constant whose value is too large for the Integer type automatically has type Int64.

  • All the usual integer functions (e.g., IntToStr) have overloaded versions to support Integer and Int64 arguments.

  • If you write your own routines that work with the Integer type, consider writing overloaded versions that use Int64. For example, if you write IntToBinary to convert an integer to a string of '0' and '1' characters, write two overloaded functions: one that takes an Integer argument and one that takes an Int64 argument.

  • There is no 64-bit unsigned integer type.

See Also

Integer Type

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.