fixed tabs, added QWord.
This commit is contained in:
@@ -3,56 +3,64 @@ The following table shows correspondences between C/C++ and Pascal numerical typ
|
|||||||
References are:
|
References are:
|
||||||
- FPC Reference guide (v1.0.8).
|
- FPC Reference guide (v1.0.8).
|
||||||
- The C Library Reference Guide, by Eric Huss.
|
- The C Library Reference Guide, by Eric Huss.
|
||||||
|
- BeAPI headers.
|
||||||
|
|
||||||
|
|
||||||
C/C++ <-> BeAPI <-> Pascal
|
C/C++ <-> BeAPI <-> Pascal
|
||||||
==========================
|
==========================
|
||||||
unsigned char = unit8 = Byte;
|
signed char = int8 = Shortint;
|
||||||
char = int8 = Shortint;
|
unsigned char = unit8 = Byte;
|
||||||
unsigned int = unit16 = Word;
|
|
||||||
short int = int16 = Smallint;
|
short int = int16 = Smallint;
|
||||||
int = = We use Integer most times for this, but could be Smallint
|
unsigned int = unit16 = Word;
|
||||||
unsigned long = uint32 = Longword;
|
|
||||||
long = int32 = Longint;
|
int = = We use Integer most times for this, but could be Smallint
|
||||||
float = = Single;
|
long = int32 = Longint;
|
||||||
double = = Double;
|
unsigned long = uint32 = Longword;
|
||||||
long double = = Extended;
|
long long = int64 = Int64;
|
||||||
|
unsigned long long = uint64 = QWord;
|
||||||
|
|
||||||
|
float = = Single;
|
||||||
|
double = = Double;
|
||||||
|
long double = = Extended;
|
||||||
|
|
||||||
|
|
||||||
C/C++ Types
|
C/C++ Types
|
||||||
===========
|
===========
|
||||||
Type Size Range
|
Type | Size | Range
|
||||||
---------------------------------
|
---------------------------------
|
||||||
unsigned char 8 bits 0 to 255
|
unsigned char | 8 bits | 0 to 255
|
||||||
char 8 bits -128 to 127
|
char | 8 bits | -128 to 127
|
||||||
unsigned int 16 bits 0 to 65,535
|
unsigned int | 16 bits | 0 to 65,535
|
||||||
short int 16 bits -32,768 to 32,767
|
short int | 16 bits | -32,768 to 32,767
|
||||||
int 16 bits -32,768 to 32,767
|
int | 16 bits | -32,768 to 32,767
|
||||||
unsigned long 32 bits 0 to 4,294,967,295
|
unsigned long | 32 bits | 0 to 4,294,967,295
|
||||||
long 32 bits -2,147,483,648 to 2,147,483,647
|
long | 32 bits | -2,147,483,648 to 2,147,483,647
|
||||||
float 32 bits 1.17549435 * (10^-38) to 3.40282347 * (10^+38)
|
float | 32 bits | 1.17549435 * (10^-38) to 3.40282347 * (10^+38)
|
||||||
double 64 bits 2.2250738585072014 * (10^-308) to 1.7976931348623157 * (10^+308)
|
double | 64 bits | 2.2250738585072014 * (10^-308) to 1.7976931348623157 * (10^+308)
|
||||||
long double 80 bits 3.4 * (10^-4932) to 1.1 * (10^4932)
|
long double | 80 bits | 3.4 * (10^-4932) to 1.1 * (10^4932)
|
||||||
|
|
||||||
|
|
||||||
FPC Pascal Types
|
FPC Pascal Types
|
||||||
================
|
================
|
||||||
Type Size Range
|
Type | Size | Range
|
||||||
-----------------------------
|
---------------------------
|
||||||
Byte 8 bits 0..255
|
Byte | 8 bits | 0..255
|
||||||
ShortInt 8 bits -128..127
|
ShortInt | 8 bits | -128..127
|
||||||
Word 16 bits 0..65535
|
Word | 16 bits | 0..65535
|
||||||
SmallInt 16 bits -32768..32767
|
SmallInt | 16 bits | -32768..32767
|
||||||
LongWord 32 bits 0..4294967295
|
LongWord | 32 bits | 0..4294967295
|
||||||
LongInt 32 bits -2147483648..2147483647
|
LongInt | 32 bits | -2147483648..2147483647
|
||||||
|
|
||||||
Integer 16/32/64 either smallint, longint or int64 | These two depends on the
|
//[*]These two depends on the compiler mode and platform.
|
||||||
Cardinal 16/32/64 either word, longword or qword | compiler mode and platform.
|
Integer | 16 32 64 | either smallint, longint or int64
|
||||||
|
Cardinal | 16 32 64 | either word, longword or qword
|
||||||
|
|
||||||
Real 16/32 (depends on the platform)
|
Real | 16/32 | (depends on the platform)
|
||||||
Single 32 bits 1.5E-45 .. 3.4E38
|
Single | 32 bits | 1.5E-45 .. 3.4E38
|
||||||
Double 64 bits 5.0E-324 .. 1.7E308
|
Double | 64 bits | 5.0E-324 .. 1.7E308
|
||||||
Extended 80 bits 1.9E-4951 .. 1.1E4932
|
Extended | 80 bits | 1.9E-4951 .. 1.1E4932
|
||||||
|
|
||||||
Int64 64 -9223372036854775808 .. 9223372036854775807
|
Int64 | 64 bits | -9223372036854775808 .. 9223372036854775807
|
||||||
QWord 64 0 .. 18446744073709551615
|
QWord | 64 bits | 0 .. 18446744073709551615
|
||||||
Comp 64 -2E64+1 .. 2E63-1
|
Comp | 64 bits | -2E64+1 .. 2E63-1
|
||||||
|
|||||||
Reference in New Issue
Block a user