Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Refinement Help output

From: ptretter::charter::net at: 20-Aug-2000 22:09

I got the following function which I enhanced from a previous posting with some help from members of this list. How do you get help to display the comments for the refinements. Paul Tretter dec2bin: func[ "Converts Based 10 Integers to Binary" dn [integer!] "Base 10 Integer" /local holder neghold /pad+ zr+ [string!] "Add String to beginning of Output value" /pad- zr- [string!] "Add String to tail of Output value" /rev "Reverses the normal output of the value"][ holder: make string! "" if dn = 0 [holder: "0"] if negative? dn [ dn: absolute dn neghold: 1] while [dn / 2 <> 0][ either dn // 2 > 0 [insert holder 1][insert holder 0] dn: to-integer dn / 2 ] if rev [reverse holder] if pad+ [insert head holder zr+] if pad- [insert tail holder zr-] if neghold = 1 [return join "-" holder] return holder ]