Differences between 32 bit and 64 bit

General discussion for topics related to the FreeBASIC project or its community.
Lost Zergling
Posts: 538
Joined: Dec 02, 2011 22:51
Location: France

Re: Differences between 32 bit and 64 bit

Post by Lost Zergling »

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: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Differences between 32 bit and 64 bit

Post by MrSwiss »

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 Integer, in the respective Compiler.)
Post Reply