Page 1 of 1
[Done] #Char
Posted: Thu Sep 28, 2006 3:56 am
by Rescator
As there is already #Long etc. and saves me/us the trouble of doing this:
Code: Select all
CompilerIf #PB_Compiler_Unicode
#Char=2
CompilerElse
#Char=1
CompilerEndIf
Debug #Char
Posted: Thu Sep 28, 2006 4:19 am
by netmaestro
SizeOf(Character) will change from 1 to 2 if you enable unicode, which is a bit more efficient than the #CompilerIf approach.
Posted: Sat Sep 30, 2006 8:26 am
by Rescator
I know. and I just noticed somethingn else...
Try:
Debug #Quad
Debug #Long
Debug #Word
Debug #Byte
Am I just loosing my mind or didn't #Long return 4 in the past?
*scratches head*
I must have missed a memo somewhere...
Posted: Sat Sep 30, 2006 8:37 am
by netmaestro
Those are constants unrelated to the size of the data they hold. SizeOf(Long) still returns 4.
Posted: Sat Sep 30, 2006 9:43 am
by Trond
Rescator wrote:I know. and I just noticed somethingn else...
Try:
Debug #Quad
Debug #Long
Debug #Word
Debug #Byte
Am I just loosing my mind or didn't #Long return 4 in the past?
*scratches head*
I must have missed a memo somewhere...
#SizeOf_<datatype> was used in PB 3.94 but was dropped. Use SizeOf(<datatype>).