Jump to content

Long integer: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
rv to MER-C - restore blanked content
Line 18: Line 18:
| [[Microsoft Windows|Windows]]
| [[Microsoft Windows|Windows]]
| Long
| Long
| 4
| 8
| -2,147,483,648<br>or -2<sup>31</sup>
| -2,147,483,648<br>or -2<sup>31</sup>
| 2,147,483,647<br> or 2<sup>31</sup>-1
| 2,147,483,647<br> or 2<sup>31</sup>-1
Line 25: Line 25:
| [[Microsoft Windows|Windows]], [[Mac OS]]
| [[Microsoft Windows|Windows]], [[Mac OS]]
| Long
| Long
| 4
| 8
| -2,147,483,648<br>or -2<sup>31</sup>
| 2,147,483,647<br> or 2<sup>31</sup>-1
|-
| [[Microsoft SQL Server|SQL Server]]
| [[Microsoft Windows|Windows]]
| BigInt
| 8
| -2,147,483,648<br>or -2<sup>31</sup>
| 2,147,483,647<br> or 2<sup>31</sup>-1
|-
| [[.NET Framework|.NET CLR/CTS]]
| [[Microsoft Windows|Windows]]
| Long or Int64
| 8
| -2,147,483,648<br>or -2<sup>31</sup>
| -2,147,483,648<br>or -2<sup>31</sup>
| 2,147,483,647<br> or 2<sup>31</sup>-1
| 2,147,483,647<br> or 2<sup>31</sup>-1

Revision as of 22:13, 18 December 2006

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 -2,147,483,648
or -231
2,147,483,647
or 231-1
VBA Windows, Mac OS Long 8 -2,147,483,648
or -231
2,147,483,647
or 231-1
SQL Server Windows BigInt 8 -2,147,483,648
or -231
2,147,483,647
or 231-1
.NET CLR/CTS Windows Long or Int64 8 -2,147,483,648
or -231
2,147,483,647
or 231-1

See also