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

[REBOL] Re: [context] Problem with context?

From: apwing::zonnet::nl at: 4-Apr-2005 17:00

Anton Rolls wrote:
>Hi Arie, > >If you had other functions in the object >which also used the rule, then it would >make sense to share the rule in the way >Volker suggested: > > parse input bind rule 'res > >which binds to the function's context (using >the local word 'res as the known-word). > >If there's only ever going to be one function, >then you might as well make all your rules >be defined in the function body as locals, then >you can probably dispense with the enclosing >object altogether! > >The fact that you did put the function in an >object to start with makes me think you did want >to share some parts like the rule... > >Anton. > >>Hi Volker, >> >>obviously I had a wrong view on these things. >>To better understand it I now moved RULE from outside to inside the >>function and then it works properly, because the words are bound to the >>function context. >>Your suggestion to put all these variables right in the object (outside >>the function) is also OK. >> >>Thanks for helping me understand that great miracle called REBOL a bit >>more again! >> >>Kind regards, >> Arie >> >> >
Hi Anton, in fact I started putting it all in an object because I saw an example showing it. In the mean time I tried a few variants (e.g. the one you mention without a surrounding object). Your points are clear. Of course you are right ;-) Thank you! Kind regards, Arie