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

[REBOL] Trying to compose a block out of global and local bindings

From: princepawn::lycos::com at: 7-Sep-2000 13:02

Librarian comment

The 6th message from Elan in this thread contains a useful explanation for beginners on the danger of re-defining "built-in" Rebol words.

Be careful to read Ladislav's clarifications in messages 7 & 
8 on contexts.
>> letter2: func [b /local name] [foreach n ["sally" "sue"][ name: n print reform reduce b] ] >> form
== ["hi" name "welcome back"]
>> name
== "bob"
>> letter2 form
hi bob welcome back hi bob welcome back ... the only problem is I was hoping that the loop values in letter2 would take precedence over the globally bound value of name and allow me to create a form letter of sorts. Could anyone help with this please?