Looping over an alpha series

For questions regarding programming in the EViews programming language.

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

caburdick
Posts: 24
Joined: Mon Jun 15, 2009 7:41 am

Looping over an alpha series

Postby caburdick » Mon Jun 15, 2009 8:04 am

How can I determine the length of an alpha series so that I can loop over it's elements.

I have a list of states and would like to loop over the list:

alpha mystates
alpha(1) = "ny"
alpha(2) = "tx"

for !i = 1 to length(mystates)
%state = mystate(!i)
Do state specific stuff
next !i

How do I determine length(mystates)?

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 58 guests