Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] 'Parse is peculiar! - fresh start

From: shannon::ains::net::au at: 16-Dec-2000 20:16

REBOL/View 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: