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