[REBOL] 'Parse is peculiar! - fresh start
From: shannon::ains::net::au at: 16-Dec-2000 20:16
REBOL/View 0.10.38.3.1 28-Nov-2000
Copyright 2000 REBOL Technologies. All rights reserved.
>> do {
{ digits: charset "0123456789"
{ line1: {Lets find "Julie<1234>"}
{ parse line1 [thru {"} copy name [thru {<} 4 digits {>} (print name)] to
end]}
** Script Error: name has no value.
** Where: print name
>> parse line1 [thru {"} copy name [thru {<} 4 digits {>}] (print name) to end]}
Julie<1234>
You're right Anton. 'name is assigned outside the sub-block and can't be
referenced in it. Either the usual rebol word-within-context system doesn't
apply to parse or it doesn't assign name until it reachs the last ']' in the
sub-block. I assumed it would work similar to this:
>>name: "Anton" do [print name]
Anton
Anton wrote: