Determing 32 or 64 bit

Everything else that doesn't fall into one of the other PB categories.
USCode
Addict
Addict
Posts: 923
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: Determing 32 or 64 bit

Post by USCode »

Is there a cross-platform way?
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Determing 32 or 64 bit

Post by RichardL »

Hi,

With the 32 bit compiler an integer variable is 4 bytes
With the 64 bit complier an integer variable is 8 bytes

So maybe Debug SizeOf(Integer) might provide a hint?

RichardL
User avatar
Bisonte
Addict
Addict
Posts: 1313
Joined: Tue Oct 09, 2007 2:15 am

Re: Determing 32 or 64 bit

Post by Bisonte »

RichardL wrote:Hi,

With the 32 bit compiler an integer variable is 4 bytes
With the 64 bit complier an integer variable is 8 bytes

So maybe Debug SizeOf(Integer) might provide a hint?

RichardL
not at runtime. It doesnt check the OS this program is executed...

And there is a "better readable" way to test it with "#PB_Compiler_Processor = #PB_Processor_x64/x86" ...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
Post Reply