[REBOL] Trying to compose a block out of global and local bindings Re:(5)

2000-09-09 Thread Al . Bri
Volker wrote: > 'protect-system 'protect-system 'protect-system ... Definitely, that too! :-) Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -><-

[REBOL] Trying to compose a block out of global and local bindings Re:(4)

2000-09-09 Thread agem
protect-system 'protect-system 'protect-system .. Volker [EMAIL PROTECTED] wrote on 9-Sep-2000/17:38:16+12:00 > princepawn wrote: > > Oh my god. I think this is the most naive thing I have ever done in my > life... I really didn't even think that I had just redefined form. > > > This is so e

[REBOL] Trying to compose a block out of global and local bindings Re:(3)

2000-09-08 Thread Al . Bri
princepawn wrote: > Oh my god. I think this is the most naive thing I have ever done in my life... I really didn't even think that I had just redefined form. > This is so embarrassing. Don't be too embarrassed. I did a similar thing in my HTML dialect, and accidentally redefined 'head. Took me a

[REBOL] Trying to compose a block out of global and local bindings Re:(2)

2000-09-08 Thread princepawn
Oh my god. I think this is the most naive thing I have ever done in my life... I really didnt even think that I had just redefined form. This is so embarrassing. --- On Fri, 8 Sep 2000 0:05 +020 alex.pini wrote: >>- Open Your Mind -< > > > >Quoting from [EMAIL PROTECTED]'s message (07-Sep-0

[REBOL] Trying to compose a block out of global and local bindings Re:(2)

2000-09-08 Thread lmecir
Hi, wrote: > I'll point out quickly that what you're trying to do is generally > considered a bad programming practice, i.e. referencing a variable > internal to a function from its argument. A caller shouldn't need to know > about and shouldn't really have direct access to variables local to a

[REBOL] Trying to compose a block out of global and local bindings Re:(2)

2000-09-08 Thread lmecir
Hi Elan, you wrote: > letter2: func [b] [ > foreach name ["Sue" "Sally"] [ > print bind b 'name > ] > ] > > Here BIND directs REBOL to associate all words contained in 'b with the > "closest" context that contains the symbol name. L: I would recommend to change the wording: {Bind assoc

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

2000-09-07 Thread rebol
Hi princepawn, pretty much everything has already been said. (1) I just happened to notice that you redefine form (was pointed out) AND use reform: >> source reform reform: func [ "Forms a reduced block and returns a string." value "Value to reduce and form" ][ form reduce value ]

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

2000-09-07 Thread lmecir
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 "we

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

2000-09-07 Thread ssayer
I'll point out quickly that what you're trying to do is generally considered a bad programming practice, i.e. referencing a variable internal to a function from its argument. A caller shouldn't need to know about and shouldn't really have direct access to variables local to a function. I will how

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

2000-09-07 Thread princepawn
>> 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 preced