On Fri, 11 Feb 2005 09:58:20 +0100, Karol Go=C5=BAli=C5=84ski <[EMAIL PROTECTED]> wrote: >=20 >=20 > Hi list! > I think I need some "binding" :-) > this script does not work as I want. > look : >=20 > unset 'a ; just for testing > unset 'b ; >=20 > object: make object! [ > variables: [ a b] ; this block may change during object > lifetime
;"make object!" detects only set-word in top-level. Rest keeps old ;binding= . ;You need=20 a: b: none > ; so should be always referenced > data: [1 2] ; data to set, may change too >=20 > ; it has to be that way > ; below is what i want repair >=20 > executor: func [ program] [ > use variables [ ; <-- i want to variables to be defi= ned > only here --> > set variables data ; setting variables > do program ; executing > ] > ] > ] >=20 > testing : >=20 > >> object/executor [ print a + b] > 3 > >> >=20 > looks fine, but : >=20 > >> print [a b] > 1 2 > >> >=20 > ups! variables are in global context > please help how to keep them in USE block > thanks in advance >=20 > Karol >=20 > -- > To unsubscribe from the list, just send an email to rebol-request > at rebol.com with unsubscribe as the subject. >=20 >=20 --=20 -Volker "Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem." David Wheeler -- To unsubscribe from the list, just send an email to rebol-request at rebol.com with unsubscribe as the subject.
