Differences between 32 bit and 64 bit

For other topics related to the FreeBASIC project or its community.
Lost Zergling
Posts: 179
Joined: Dec 02, 2011 22:51
Location: France

Re: Differences between 32 bit and 64 bit

Postby Lost Zergling » Apr 19, 2018 21:22

I changed "Dim As uInteger uNodeCOUNT, uGarbCt, uCount, uContainerGarbCt, uContainerGivenCt" to "Dim As uLong uNodeCOUNT, uGarbCt, uCount, uContainerGarbCt, uContainerGivenCt" in my list type and it does not crash in 64 bits.
An other solution to avoid crash in 64 bits is to add 3 "this.AllOf" calls in HashStep property and it works fine in 32 and 64 with uInteger. So a link can be done between type of variable and pointers behaviour ? Meaning an incorrect type declaration for 64 bits can be compensate by specific pointers handling to get a program working in both mode(constrained programming). I just say it is possible, ..
MrSwiss
Posts: 3029
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Differences between 32 bit and 64 bit

Postby MrSwiss » Apr 19, 2018 21:35

Lost Zergling wrote:So a link can be done between type of variable and pointers behaviour ?
This is only the case, with Integer/UInteger (behaves like a ptr) since,
all other data-types, are *fixed-size*:

    Byte/UByte (8 bits)
    Short/UShort (16 bits) -- [Integer in: -lang "QB" (fixed size)]
    Long/ULong and Single (32 bits)
    LongInt/ULongInt and Double (64 bits)
This is irrespective, of the FBC's bitness, used. All above referres to: -lang "FB"!

Ptr size FBC 32 = 32 bit (4 Byte) -- Ptr size in FBC 64 = 64 bit (8 Byte)
(The same, as the size of [U]Integer, in the respective Compiler.)

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests