[REBOL] =?iso-8859-1?q?R=E9f=2E_=3A_[REBOL]_Context_misery?=
From: vdemongodin::cer-ca::fr at: 5-Jun-2001 14:08
After some tests, i obtain:
myfunc: func [BlockName [string!]
/local aa bb][
aa: copy [1 2 3]
bb: append reduce [to-set-word to-word BlockName] [ copy aa]
print ["aa is " mold aa]
print ["bb is " mold bb]
do bind bb 'aa ; < define "context" of aa
]
BlockName is defined in global context, in this case.:
>> myFunc "THISISANEWVARIABLE"
aa is [1 2 3]
bb is [THISISANEWVARIABLE: copy aa]
== [1 2 3]
>> THISISANEWVARIABLE
== [1 2 3]
Vincent.