Page 2 of 2
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
Posted: Sat Jan 05, 2019 9:41 am
by Little John
Josh wrote:@Dude
It is not a good behavior to extend a thread with a question that has nothing to do with the original topic. It'll only lead to confusion like this.
Well, I think it is consequent: It was
he who extended this thread and now it is
he who is confused ...

Re: How do you Detect 32-bit or 64-bit Compiler Versions?
Posted: Sat Jan 05, 2019 1:10 pm
by Dude
Sorry Mijikai and Little John; I misunderstood what was happening with SizeOf(). I'll take my leave now.
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
Posted: Mon Jan 14, 2019 5:34 pm
by Jeff88
How about testing length of default integers. Code below shows the difference.
Code: Select all
[/Dim a(2) ;64-bit systems each element is 8 bytes
Dim b.l(2) ;32-bit systems each element is 4 bytes like this
a(1)=-1
b(1)=-1
Debug PeekB(@a(1)+4) ;5th byte of 8 bit word
Debug PeekB(@b(1)+4) ;1st byte of next 4 bit word
End
code]
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
Posted: Mon Jan 14, 2019 7:08 pm
by Josh
Jeff88 wrote:How about testing length of default integers
For this you can use:
SizeOf() can also be used with
CompilerIf.
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
Posted: Tue Jan 15, 2019 12:30 am
by Olliv
As said by Mijikai earlier
Thank you Little John for cross-platform giving.
Maybe CPUID asm op could allow including Mac and pass API.