Well, I think it is consequent: It was he who extended this thread and now it is he who is confused ...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.
How do you Detect 32-bit or 64-bit Compiler Versions?
-
- Addict
- Posts: 4519
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
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?
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?
For this you can use:Jeff88 wrote:How about testing length of default integers
Code: Select all
SizeOf (Integer)
sorry for my bad english
Re: How do you Detect 32-bit or 64-bit Compiler Versions?
As said by Mijikai earlier
Maybe CPUID asm op could allow including Mac and pass API.
Thank you Little John for cross-platform giving.Mijikai wrote:How about:Code: Select all
Debug SizeOf(Integer)
Maybe CPUID asm op could allow including Mac and pass API.