Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Integer (computer science)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Long integer === A ''long integer'' can represent a whole [[integer]] whose [[range (computer science)|range]] is greater than or equal to that of a standard integer on the same machine. In [[C (programming language)|C]], it is denoted by {{mono|long}}. It is required to be at least 32 bits, and may or may not be larger than a standard integer. A conforming program can assume that it can safely store values between β(2<sup>31</sup>β1)<ref name="c-std-6.2.6.2p2" /> and 2<sup>31</sup>β1,<ref name="c-std-5.2.4.2.1" /> but it may not assume that the range is not larger. {{Table alignment}} {| class="wikitable col6center" |+ Common long integer sizes |- ! [[Programming language]] ! Approval Type ! [[Computing platform|Platform]]s ! Data type name ! Storage in [[bytes]] ! [[Signedness|Signed]] range ! [[Signedness|Unsigned]] range |- | [[C (programming)|C]] ISO/ANSI C99 | International Standard | [[Unix]], 16/32-bit systems<ref name="agnerfog" /><br />[[Windows]], 16/32/64-bit systems<ref name="agnerfog" /> | {{mono|long}} | 4<br />(minimum require{{shy}}ment 4) | {{val|β2147483647| to |+2147483647|fmt=commas}} | {{val|0|to|4294967295|fmt=commas}}<br />(minimum require{{shy}}ment) |- | [[C (programming)|C]] ISO/ANSI C99 | International Standard | [[Unix]],<br />64-bit systems<ref name="agnerfog" /><ref name="drdobbsinteger" /> | {{mono|long}} | 8<br />(minimum require{{shy}}ment 4) | {{val|β9223372036854775807|to|+9223372036854775807|fmt=commas}} | {{val|0|to|18446744073709551615|fmt=commas}} |- | [[C++]] ISO/ANSI | International Standard | [[Unix]], [[Windows]],<br />16/32-bit system | {{mono|long}} | 4 <ref>{{cite web |title=Fundamental types in C++|url=http://cppreference.com/wiki/language/types|publisher=cppreference.com|access-date=5 December 2010}}</ref><br />(minimum require{{shy}}ment 4) | {{val|β2147483648|to|+2147483647|fmt=commas}}<br /> | {{val|0|to|4294967295|fmt=commas}}<br />(minimum require{{shy}}ment) |- | [[C++/CLI]] | International Standard<br />[[ECMA-372]] | [[Unix]], [[Windows]],<br />16/32-bit systems | {{mono|long}} | 4 <ref>{{cite web| url=http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-372.pdf |title=Chapter 8.6.2 on page 12|publisher=ecma-international.org}}</ref><br />(minimum require{{shy}}ment 4) | {{val|β2147483648|to|+2147483647|fmt=commas}}<br /> | {{val|0| to |4294967295|fmt=commas}}<br />(minimum require{{shy}}ment) |- | [[Visual Basic (classic)|VB]] | Company Standard | [[Windows]] | {{mono|Long}} | 4 <ref>VB 6.0 help file</ref> | {{val|β2147483648|to|+2147483647|fmt=commas}} | {{n/a}} |- | [[Visual Basic for Applications|VBA]] | Company Standard | [[Windows]], [[Mac OS X]] | {{mono|Long}} | 4<ref>{{cite web |url=http://msdn2.microsoft.com/en-us/library/aa164754(office.10).aspx |title=The Integer, Long, and Byte Data Types (VBA) |access-date=2006-12-19 |publisher=microsoft.com}}</ref> | {{val|β2147483648| to |+2147483647|fmt=commas}} | {{n/a}} |- | [[Microsoft SQL Server|SQL Server]] | Company Standard | [[Windows]] | {{mono|BigInt}} | 8 | {{val|β9223372036854775808|to|+9223372036854775807|fmt=commas}} | {{val|0|to|18446744073709551615|fmt=commas}} |- | [[C Sharp (programming language)|C#]]/ [[VB.NET]] | ECMA International Standard | [[Microsoft .NET]] | {{mono|long}} or {{mono|Int64}} | 8 | {{val|β9223372036854775808|to|+9223372036854775807|fmt=commas}} | {{val|0|to|18446744073709551615|fmt=commas}} |- | [[Java (programming language)|Java]] | International/Company Standard | [[Java platform]] | {{mono|long}} | 8 | {{val|β9223372036854775808|to|+9223372036854775807|fmt=commas}} | {{n/a}} |- | [[Pascal (programming language)|Pascal]] | ? | [[Windows]], [[UNIX]] | {{mono|int64}} | 8 | {{val|β9223372036854775808|to|+9223372036854775807|fmt=commas}} | {{val|0|to|18446744073709551615|fmt=commas}} (Qword type) |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)