Testing for 64-Bit processor

[quote=379981:@Jason Parsley]This code may help:

[code]
Dim S as string

#If TargetWindows then // If on windows

#If Target64bit
  Self.BackColor = &c252AFF   'Blue
  'me.Caption = "64"
  S = "This is a 64-Bit Windows OS"
  S = S + chr(13) + "This computer is operating on a 64-bit processor"
#elseif Target32Bit
  Self.BackColor = &c1EB126   'Green
  'me.Caption = "32"
  S = "This is a 32-Bit Windows OS"
  S = S + chr(13) + "This computer is operating on a 32-bit processor"
#else
  Self.BackColor = &cFF0000   'Red
  S = "This is Windows on something we dont recognize"
#endif

EditField1.text = S 

#Endif
[/code][/quote]

This code gives the wrong answer, the answer you get is wether this code is compiled with the compile setting on 32 bit or 64 bit.
It doesn’t answer if the processor is 32 or 64 bit and not if the OS is 32 or 64 bit.

I am gathering from this that if the OS is 64bit then by inference the processor must be 64Bit, am I correct and is that so?

Thanks.

Lennox

Lennox you are correct

just remember that 32bit OS can run on 64bit CPU , Well Windows and Linux not sure if macOS allows for that

OK, Thanks for all the responses

At Command Prompt…

wmic computersystem get systemtype
SystemType
x64-based PC

Right-Click This PC and selecting “Properties” gave this…
System Type 64-bit Operating system, x64-based processor

Thanks again everyone.

Lennox