looping through a vector

For questions regarding programming in the EViews programming language.

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

Mgatmait
Posts: 8
Joined: Fri Jun 28, 2019 6:42 am

looping through a vector

Postby Mgatmait » Tue Aug 06, 2019 6:02 am

is it possible to loop through a vector? for example

vector(5) test
test.fill 55, 2, 3

for !i in test
show !i
next

it will show 55 then 2 then 3

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

Re: looping through a vector

Postby EViews Gareth » Tue Aug 06, 2019 7:42 am

Only with something like:

Code: Select all

for !i=1 to @rows(test)
!j = rows(!i)
next
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 40 guests