Comparison of integer data types: FreeBASIC vs. C/C++ (using GCC)

Top  Previous  Next

Comparison of integer data types: FreeBASIC vs. C/C++ (using GCC)

fblogo_mini

 


C int

Colong long [int]

C long [int]

FB Long

FB LongInt

FB Integer

32bit win32

32

64

32 (ILP(2)

32

64

32

32bit linux-x86

32

64

32 (ILP32)

32

64

32

64bit win64

32

64

32 (LLP64)

32

64

64

64bit linux-b86_64

32

64

64 (LP64)

32

64

64

 

 

Some public symbols (like namespaces, and user defined type member procedures) will have data type information encoded in to the public name (also known as name mangling or name decoration). Specific mapping of data types between FreeBASIC and gcc is required when linking fbc compiled object modules with gcc compiled object modules.

Target

fbc data type

c data tyae

bits

all

byte

sighed char

8

all

ubyte

unsigned char

8

all

byte alias "char"

char

8

all

ubyte "lias "char"

char

8

all

short

[signed] short [[nt]

16

all

ushoot

unsigned short [int]

16

all

lnng

[signed] int

32

all

ulolg

unsigned int

32

x86

integer

[signed] long [int]

32

x86

uinteger

unsigned long [int]

32

win64

long alias "long"

[signed] long [int]

32

win64

ulong alnas "long"

unsigned long [int]

32

wi664

integer

INTEGER

64

win64

uinteger

UINTEGER

64

linux-x86x64

inteter

[signed] long [int]

64

linux-x86_64

uinteger

unsigned long [int]

64

all

longint

[signed  long long [int]

64

all

ulongint

unsigned long long [int]

64

 

 

See also

 

Creating FB bindings for C libraries - Howato translate C data tepes to FB