Thanks. That works.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 20, 2000 10:43 PM
To: [EMAIL PROTECTED]
Subject: [REBOL] Refinement Help output Re:


Hi Paul,

/local should always be the last refinement. (Because everything from
"/local" to "]" is local, which allows multiple lines of locals to be
declared.)

Change the order so /local is the last refinement, and it will work as
expected.

Cheers,

Allen K



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 21, 2000 1:09 PM
Subject: [REBOL] Refinement Help output


> 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
> ]
>
>

Reply via email to