Reference string variables dynamically
Posted: Tue Dec 15, 2009 12:13 pm
Dear EViews community,
sorry for keeping you busy today:
I have a few string variables that i want to assign some values to. The variables are called
More specifically, I want to assign the values in a for loop, ie
I get the error message: {%ref} is not defined or is an illegal command in {%ref} = "test"
Question: Is it possible to reference variable names dynamically in EViews 6 or do I have to use a workaround?
Thanks and all the best
Philipp
sorry for keeping you busy today:
I have a few string variables that i want to assign some values to. The variables are called
Code: Select all
%myvar_1
%myvar_2
%myvar_3
...Code: Select all
for !i=1 to 3
%ref = "myvar_" + @str(!i)
{%ref} = "test"
next
Question: Is it possible to reference variable names dynamically in EViews 6 or do I have to use a workaround?
Thanks and all the best
Philipp