Binary data

Blitz3D Forums/Blitz3D Beginners Area/Binary data

JBR(Posted 2006) [#1]
Is it possible to do something like %10110000 like we use $ff00ff00 for hexadecimal?

i.e.
Data %10110000

Thanks
Jim


GfK(Posted 2006) [#2]
Yes.
i% = %00001001
;result = 9



Sir Gak(Posted 2006) [#3]
Oh, that's EASY!


Buggy(Posted 2006) [#4]
I understand why it's 9, but why doesn't Blitz return 1001 instead?


BlackJumper(Posted 2006) [#5]
@Buggy:

the %0001001 is converted to an integer representation during the compilers first pass before tokenising all of the commands for translation


Beaker(Posted 2006) [#6]
Print Bin(i)