BIN function

Monkey Forums/Monkey Programming/BIN function

pit(Posted 2015) [#1]
Hi all,

In Bmax, there was a function "Bin" which convert an Int to his binary string representation.
I don't find it in Monkey.
Any idea if someone develop this function for Monkey ?

Cheers

Pit


pit(Posted 2015) [#2]
Hi all (again),

so it seems that tonight I make the questions... and the answers... :-)

Based on the BMax source code, I created the same function in Monkey:



And it run fine.

Cheers

Pit


Samah(Posted 2015) [#3]
Note that Shr in Monkey is arithmetic, like Sar in BlitzMax. There is no non-arithmetic shift-right.
Also if you want the ascii value for "0" you can do this:
"0"[0]



pit(Posted 2015) [#4]
ok !

thanks Samah !

Pit