[REBOL] Re: Context misery
From: sanghabum:aol at: 5-Jun-2001 18:07
Hi Carl,
> 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]]
>
> myfunc 'example
> print example
Well, it's dynamic insofar as I don't know what it is when the program
starts. It is read as a string from a file. So (the original intention was)
it goes into the function as a string, and comes out as a global variable. So
I can use your function like this:
myfunc to word! FieldName
where Fieldname is the string.
And that solves the original problem. Thanks!
While I've got your attention, can I just say that I really really like this
language! Thank you all for creating it.....I think my main problem is trying
to run before I can walk, and often running straight into brick walls before
donning the right head gear.
--Colin.