Jump to content

Long integer

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by DigitalEnthusiast (talk | contribs) at 22:15, 18 December 2006 (→‎Common sizes: Correcting as per talk page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, a long integer is a variable that can hold a positive or negative whole number whose range is greater or equal to that of a standard integer on the same machine.

In practice it is usual for a long integer to require double the storage capacity of a standard integer, although this is not always the case.

A variable defined as a long integer in one programming language may be different in size to a similarly defined variable in another. In some languages this size is fixed across platforms, whilst in others it is machine dependent. In some languages this data type does not exist at all.

Common sizes

Programming language Platforms Data type name Storage in bytes Minimum range Maximum range
VB Windows Long 8 Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 Unsigned: 0 to +18,446,744,073,709,551,615
VBA Windows, Mac OS Long 8 Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 Unsigned: 0 to +18,446,744,073,709,551,615
SQL Server Windows BigInt 8 Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 Unsigned: 0 to +18,446,744,073,709,551,615
.NET CLR/CTS Windows Long or Int64 8 Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 Unsigned: 0 to +18,446,744,073,709,551,615

See also