Code: Select all
; example 1
For a = 0 To 64
i.i = (1<<a)
Debug "i "+a+" "+ i +" "+Hex(i)
Next a
; example 2
For a = 0 To 64
q.q = (1<<a)
Debug "q "+a+" "+ q +" "+Hex(q)
Next a
Code: Select all
; example 1
For a = 0 To 64
i.i = (1<<a)
Debug "i "+a+" "+ i +" "+Hex(i)
Next a
; example 2
For a = 0 To 64
q.q = (1<<a)
Debug "q "+a+" "+ q +" "+Hex(q)
Next a


No, a quad is always 8 bytes. Directly from the documentation:mestnyi wrote: Mon Nov 04, 2024 5:49 pm ok, but then is quard the same number in 32-bit and 64-bit?
I would check it myself, but so far there is nothing.![]()
Long
.l
4 bytes
-2147483648 to +2147483647
Integer
.i
4 bytes (using 32-bit compiler)
-2147483648 to +2147483647
Integer
.i
8 bytes (using 64-bit compiler)
-9223372036854775808 to +9223372036854775807
Quad
.q
8 bytes
-9223372036854775808 to +9223372036854775807
infratec wrote: Mon Nov 04, 2024 8:10 pm Have you ever looked in the Help about variables![]()
https://www.purebasic.com/documentation ... ables.html
Code: Select all
Define.i a
a - a
a + 1
a << 31
a >> 31
Debug a
; (1 on X64, while -1 on X86)Code: Select all
Define.i a
a - a
a + %1001
a << 40
a >> 40
Debug a
; (displays '9' on X64, versus '0' on X86)Code: Select all
x86 x64
L 32 32
Q 64 64
i 32 64