stop a program

For questions regarding programming in the EViews programming language.

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

Nau2306
Posts: 74
Joined: Thu Nov 17, 2011 11:51 am

stop a program

Postby Nau2306 » Thu Aug 16, 2012 12:45 am

Hello

I am currently running a for loop with 1000 estimations, I would like to know if there is a way to skip an estimation by imposing certain conditions without it displaying an error message and stopping the program.

Thanks

bhaupt
Posts: 25
Joined: Fri May 07, 2010 1:16 pm

Re: stop a program

Postby bhaupt » Thu Aug 16, 2012 5:26 am

Code: Select all

for !i = 1 to 10000 [program iterations] if [condition] then exitloop endif next
or alternatively

Code: Select all

!i = 1 !exit = 0 while !i <= 10000 and !exit=0 [program steps] if [condition] then !i = !i + 10 'here I am allowing for a conditon to decrease the number of iterations endif if [condition] then !exit = 1 ' here I am allowing for a condition to exit the loop at the wend. endif wend


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests