Page 1 of 1

Loop over pre-defined string

Posted: Wed Oct 16, 2013 4:35 am
by PaulvanErp
Hi,

I have a pre-defined string containing variables:

%components = "pieh schp banp ncar main"

I want to loop over these variables, like I do here:

for %n {%components}
series dc_{%n}
call devcycle (dc_{%n}, {%n}, 0)
delete {%n}
next

This combination of variables is used multiple times in my program and I do not want to change it everywhere, but only once (at the start of my program), so it is also easy to use for others. Unfortunately this does not work, since it does not take the five components as seperate variables, but defines %n = "pieh schp banp ncar main".

Can/should this be done in a different way?

Thanks,

Paul

Re: Loop over pre-defined string

Posted: Wed Oct 16, 2013 6:50 am
by EViews Gareth
Which version of EViews?

Re: Loop over pre-defined string

Posted: Thu Oct 17, 2013 12:40 am
by PaulvanErp
EViews 6

Re: Loop over pre-defined string

Posted: Thu Oct 17, 2013 6:25 am
by EViews Gareth
Then you can not.