Entier long

Un article de Wikipédia, l'encyclopédie libre.

En programmation informatique, un entier long (en anglais long integer) est un type de données qui représente un nombre entier pouvant prendre plus de place sur une même machine qu'un entier normal.

En C, ce type est annoncé par long. Il requiert au moins 32 bits de mémoire, et est souvent plus grand qu'un entier standard (bien que ce ne soit pas nécessaire).

Tailles habituelles[modifier | modifier le code]

Langage de programmation Approbation Plates-formes Nom du type de données Taille en octets Valeurs signées Valeurs non signées
C ISO/ANSI C99 International Standard Unix, 16/32-bit
Windows, 16/32/64-bit
long 4
(minimum 4)
−2 147 483 648 à +2 147 483 647 0 à 4 294 967 295
(minimum)
C ISO/ANSI C99 International Standard Unix,
64-bit
long 8
(minimum 4)
-9 223 372 036 854 775 808 à +9 223 372 036 854 776 000 0 à 18 446 744 073 709 552 000
C++ ISO/ANSI International Standard Unix, Windows,
16/32-bit
long 4 [1]
(minimum 4)
−2 147 483 648 à +2 147 483 647
0 à 4 294 967 295
(minimum)
C++/CLI (en) International Standard
ECMA-372
Unix, Windows,
16/32-bit
long 4 [2]
(minimum 4)
−2 147 483 648 à +2 147 483 647
0 à 4 294 967 295
(minimum)
VB Company Standard Windows Long 4 [3] −2 147 483 648 à +2 147 483 647 N/A
VBA Company Standard Windows, Mac OS Long 4 [4] −2 147 483 648 à +2 147 483 647 N/A
SQL Server Company Standard Windows BigInt 8 -9 223 372 036 854 775 808 à +9 223 372 036 854 776 000 0 à 18 446 744 073 709 551 615
C♯/ VB.NET ECMA International Standard Microsoft .NET long or Int64 8 -9 223 372 036 854 775 808 à +9 223 372 036 854 776 000 0 à 18 446 744 073 709 551 615
Java International/Company Standard Plate-forme Java long 8 -9 223 372 036 854 775 808 à +9 223 372 036 854 776 000 N/A
Pascal ? Windows, UNIX int64 8 -9 223 372 036 854 775 808 à +9 223 372 036 854 776 000 0 à 18 446 744 073 709 551 615 (Qword type)

Équivalent à long int[5]

Notes et références[modifier | modifier le code]

  1. « Fundamental types in C++ », cppreference.com (consulté le )
  2. « Chapter 8.6.2 on page 12 », ecma-international.org
  3. VB 6.0 help file
  4. « The Integer, Long, and Byte Data Types (VBA) », microsoft.com (consulté le )
  5. « ISO/IEC 9899:201x », open-std.org (consulté le )

Voir aussi[modifier | modifier le code]