Thanks Anton, your response was very useful and interesting. But, if I want to use different word defined in different context, i must write something like:
print bind [a] ctx1 print bind [b] ctx2 print bind [c] ctx3 Am I wrong? I think that some like using: [ 'ctx1 'ctx2 'ctx3 ] print a print b print c would be more easy 2006/2/17, Anton Rolls <[EMAIL PROTECTED]>: > > Hi Cavva, > > As Sunanda pointed out, we use objects all the time > for this. eg: > > make object! [print: "lost!"] > > It looks in the above example that we have redefined the > word 'print. We have, but only the 'print in that object. > The value of 'print in the default, global context is still > the same and so 'print evaluates as usual. > > In the following example I am binding a block of words > to a particular context. Those words which are found in > the context will be bound to the context. The rest of the > not-found words will keep their current binding: > > a: "global" > b: "global" > ctx: context [b: "local"] > print bind [a b] ctx > > ;---> global local > > You can bind huge chunks of code if you like. > This gives the same result as above: > > do bind [print [a b]] ctx > > ;---> global local > > Also if you want to get just one word out of a particular > object, you can use IN and GET: > > print get 'a ;---> global > print get in ctx 'b ;---> local > > Anton. > > > If i have two identical word, how can i use the second without > > "delete"(replace) the first? > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. > > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
