[REBOL] Re: Context misery
From: carl:rebol at: 5-Jun-2001 10:02
Ah, but what are you really trying to do?
From your example, the variable is not really dynamic
(because you use exactly the string you pass in for it.)
So, just pass the name as a name.
myfunc: func [name] [set name copy [1 2 3]]
That will allow 'example to be part of any context,
including objects and locals to functions.
You can also use the shorthand:
myfunc: func ['name] [set name copy [1 2 3]]
And, if you need "code" as part of it:
myfunc: func [name code] [set name do code]
myfunc 'example [1 + 2]
You get the idea,