That's cool Paul. 
BTW: If you check out the user's guide, you'll
see the function print-binary in the section
on logical operators. 
It does the same thing, but I as a relative
newbie find yours more readable. Might
be fun to compare benchmarks.
hmmm!
-Tim
At 07:48 AM 8/1/00 -0500, you wrote:
>
>       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.
>
>Paul Tretter
>
>
>dec-to-bin: func[
>    "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
>    ]
>    print holder
>
>]
>
>

Reply via email to