Thanks Gabriele,
I was wondering where the to-integer was, but then i realised that the
(value: load value) took care of it.
Interesting that you looked at the data in terms of repeating groups and so
processed them using some..., when i came up with a parse rule, i tried to
use recursion and i think that caused problems for me.
Mike.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 19, 2000 2:50 AM
Subject: [REBOL] Re: Parse questions ??
> Hello [EMAIL PROTECTED]!
>
> On 19-Feb-00, you wrote:
>
> m> I have a file consisting of lines in the following format:
>
> m> "23123+34234+234234-23423+3-"
>
> m> ie, n digits followed by a sign etc etc.
>
> What about:
>
> >> data: "23123+34234+234234-23423+3-"
> == "23123+34234+234234-23423+3-"
> >> values: make block! 10
> == []
> >> digits: charset "0123456789"
> == make bitset! #{
> 000000000000FF03000000000000000000000000000000000000000000000000
> }
> >> parse data
> [ some
> [ copy value some digits
> [ (value: load value)
> [ ["+" (insert tail values value) | "-" (insert tail values negate
value)]
> [ ]
> [ ]
> == true
> >> values
> == [23123 34234 -234234 23423 -3]
>
> Regards,
> Gabriele.
> --
> o--------------------) .-^-. (----------------------------------o
> | Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
> | GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
> o--------------------) `-v-' (----------------------------------o
>