Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
prog:lazarus:types:types [12/04/2020 17:22]
thierry [Types Pascal natifs]
prog:lazarus:types:types [12/05/2023 18:33] (Version actuelle)
thierry [Correspondances de types]
Ligne 1: Ligne 1:
 ====== Les Types ====== ====== Les Types ======
 +===== Sources =====
 +  * [[https://​www.freepascal.org/​docs-html/​prog/​progse32.html#​x198-2030008.2]]
 +
 ===== Types Pascal natifs ===== ===== Types Pascal natifs =====
  
Ligne 17: Ligne 20:
  
 ==== Types valides ==== ==== Types valides ====
-  ​* string +^ Type         ^ Taille ​           ^ Min                            ^ Max               ^ Signé ^ 
-  ​* byte = octets +| Byte   ​|1 Octet / 8 bits     ​|0 ​                    | 255  | Non | 
-  ​* boolean +| Shortint |1 Octet |-128 |127 | Oui | 
-  ​* interger = SmallInt +| Word |2 Octets / 16 bits |0 | 65535 | Non | 
-  ​* int64 +| Smallint | 2 Octets / 16 bits | -32768 | 32767 | Oui |  
-  ​* QWord UInt64 ​8 octets +|Longword |4 Octets / 32 bits |0 |4294967295|Non | 
-  ​* LongWord ​= DWord = Cardinal = 4 octets +|DWord |4 Octets / 32 bits |0 |4294967295|Non | 
-  ​* ​Double = Real ValReal+| Cardinal |4 Octets / 32 bits |0 |4294967295 |Non | 
 +| Integer |4 Octets / 32 bits |-2147483648 |2147483647 |Oui | 
 +| Longint |4 Octets / 32 bits |-2147483648 |2147483647 |Oui | 
 +|QWord |8 Octets / 64 bits |0‬ |x‭FFFF FFFF FFFF FFFF‬ |Non | 
 +|Int64 |8 Octets / 64 bits |-‭9 223 372 036 854 775 808‬ |‭9 223 372 036 854 775 807 |Oui | 
 +| String | ​ |  |  |  | 
 +| Char |Octect ​ |  |  |  | 
 +| Boolean | ​ |False ​ |True  |  | 
 +| Float |  |  |  |Oui | 
 +| Double |  |  |  |Oui | 
 +| Real |  |  |  |Oui | 
 +==== Correspondances de types ==== 
 +<​code>​ 
 +Int8 = ShortInt; 
 +</​code>​ 
 +<​code>​ 
 +Int16 = SmallInt = Integer 
 +</​code>​ 
 +<​code>​ 
 +Int32 = Longint; 
 +</​code>​ 
 +<​code>​ 
 +UInt8 = Byte; 
 +</​code>​ 
 +<​code>​ 
 +UInt16 ​ = Word; 
 +</​code>​ 
 +<​code>​ 
 +UInt32 ​= DWord = LongWord ​= Cardinal 
 +</​code>​ 
 +<​code>​ 
 +UInt64 ​  QWord 
 +</​code>​ 
 +<​code>​ 
 +Real = Double = TDateTime ​TDate = TTime  
 +</​code>​ 
 +<​code>​ 
 +IntPtr ​ = PtrInt = NativeInt 
 +</​code>​ 
 +<​code>​ 
 +UIntPtr = PtrUInt = NativeUInt  
 +</​code>​