[fpc-pascal] 32 to 64 bits
Marco van de Voort
marcov at stack.nl
Sat Jan 10 00:36:37 CET 2009
In our previous episode, JoshyFun said:
> Can anybody help me understanding the variables which will be
> different (in size) in 32 and 64 bits versions, and which ones are
> "size fixed" across platform bits ?
>
> So the question, something like a table:
Afaik most is in the docs, but some short pointers:
32 64
unsigned 16 bits WORD? WORD?
signed 16 bits see table docs (smallint/shortint)
unsigned 32 bits DWORD? DWORD?
signed 32 bits compiler mode dependant 16/32
unsigned 64 bits QWORD? QWORD?
signed 64 bits Int64? Int64?
Native "integer" "native" is ambiguous.
Signed integer as big
as pointer PtrInt Ptrint
Unsigned integer as big
as pointer PtruInt Ptruint
"native" is confusing since it can taken in many ways. Native as in most
performance? Register size? Addressing size? Addressing size + segment ?
(size_t, ssize_t).
> Where LongInt fits ? Bits dependent or not ?
always 32-bit signed.
> Maybe a table is available in the wiki, but I was unable to find it.
The docs are the primary source, the language ref should have a table
somewhere near the start. I sometimes use it, because I always forget which
is 8-bit signed and which is 16-bit signed. (which is why I never use them
and always use ctypes)
More information about the fpc-pascal
mailing list