[REBOL] Decimal to Binary Script
From: ptretter::charter::net at: 1-Aug-2000 7:48
Ok, I created my first useful function. I created the following function
because enbase/base value 2 gave me a limitation. So add this script to
your %user.r file. Wish this could be added to /Core as it really needs a
simple function for this. I hope to post a view based Subnet Calculator
soon. Let me know if it helps.
"Converts Based 10 Integers to Binary"
dn [integer!] "Base 10 Integer"][
holder: copy ""
while [dn / 2 <> 0][
either dn // 2 > 0 [insert holder 1][insert holder 0]
dn: to-integer dn / 2