Hello Gavin.
[EMAIL PROTECTED] wrote:
>Lookin' for help again...
[skipped motivation :)]
>It feels like there should be an easy way to build a charset,
>and them maybe do arithmetic on it using 'difference'.
>
>You know how you can do this...
>
>allowable: charset [#"A" - #"Z"]
>
>well I really want to be able to something do this:
>
>allowable: charset [#00 - #FF]
Try this.
allowable: charset [#"^(0)" - #"^(FF)"]
I know this isn't (yet) mentioned in the User Guide but I've
sent feedback to that effect. Regardless, it works.
>Conceptually what I want is:
>
>allowable: charset difference ['set of all chars'] [#"&" #"<"]
That would be expressed (in REBOL 2.2 and above) as
allowable: difference/only charset [#"^(0)" - #"^(FF)"]
charset [#"&" #"<"]
but I prefer
allowable: complement charset [#"&" #"<"]
not only because it's faster but also because the difference
function was introduced in 2.2 and not everyone has upgraded
to that version yet (it's a great function, though).
Brian Hawley