Thanks Allen. That certainly does work.

But, now I'm confused. Why is that different to what I had? Or, why didn't I
get a new empty string each call previously?

Brett.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 01, 2000 5:19 PM
Subject: [REBOL] Parser seems to have bug - different results on multiple
calls. Re:(2)


> Hi Brett,
>
> change
> cell-data: {}
> to
> cell-data: copy {}
>
> This ensures you get a new empty string each call.
>
> Cheers,
>
> Allen K
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 01, 2000 4:48 PM
> Subject: [REBOL] Parser seems to have bug - different results on multiple
> calls. Re:
>
>
> > How embarassing. Sent the wrong code. Here is the actual problem code.
> >
> >     only-string: func[ s [any-string! none!] ][ either s [s][{}]]
> >
> >     quoted-data-rule: [
> >        (cell-data: {} print "--init-line--") ; This seems to be ignored
on
> > subsequent calls of parse.
> >        {"} copy data to {"} {"} (append cell-data only-string data)
> >        any [
> >            {"} copy data to {"} {"} (append cell-data rejoin [{"}
> > only-string data])
> >        ]
> >     ]
> >     parse/all {"""Mutter."} quoted-data-rule  ; This looks ok.
> >     print cell-data                         ;
> >
> >     parse/all {"""Mutter."} quoted-data-rule  ; This is not right.
> >     print cell-data                         ;
> >
> >     parse/all {"""Mutter."} quoted-data-rule  ; Bugger.
> >     print cell-data                         ;
> >
> >
> >
>

Reply via email to