Error trying to exit loop

For questions regarding programming in the EViews programming language.

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

Jolandilab
Posts: 4
Joined: Wed Nov 26, 2014 8:39 am

Error trying to exit loop

Postby Jolandilab » Thu Nov 27, 2014 12:17 am

Hi

I am trying to run a program through multiple files. the files are named 2002-1, 2002-2 up to 2002-12. If I do not put the exitloop in then the loop keeps running. If I do put the exit loop in I get an error message after the first file. My code currently is as follows. I would also like to save and close the files.

for !i = 1 to 13
wfopen C:\Users\01404702\Documents\1.Workfile\2002-!i
include masters
if !i > 12 then exitloop
Next

I would appreciate any help

Jolandilab
Posts: 4
Joined: Wed Nov 26, 2014 8:39 am

Re: Error trying to exit loop

Postby Jolandilab » Thu Nov 27, 2014 12:59 am

Solved it with a while loop


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests