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 Re:

From: lmecir:geocities at: 8-Sep-2000 0:38

Hi, try this: letter2: func [b] [foreach name ["sally" "sue"][print bind/copy b 'name]] form: ["hi" name "welcome back"] letter2 form Regards Ladislav
> >> 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.