looping through a list of series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

Krzysztof
Posts: 15
Joined: Mon Jan 11, 2010 3:53 am

looping through a list of series

Postby Krzysztof » Thu Jan 14, 2010 8:39 am

let's assume that I am looping through list of series with the code below

Code: Select all

for %y sed cue tor inp series {%y}_proc = {%y}*100 next
but if I would like to use the list of the same variables many times it would be desirable to define it within the code and then loop like below

Code: Select all

%list = "sed cue tor inp" for %y {%list} series {%y}_proc = {%y}*100 next
this does not work unfortunately :(
I know that I could create a group including these series and then loop through all the series in the group. However, the list would be much straight forward.

Is my idea feasible to implement in Eviews?

Thanks a lot in advance, k

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: looping through a list of series

Postby EViews Gareth » Thu Jan 14, 2010 9:00 am

That will work in EViews 7.


A work-around in EViews 6 is to store the codes into a table, then loop through the cells of the table everytime you want to do the loop.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests