avoid "divide by zero" prg stop

For questions regarding programming in the EViews programming language.

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

BT454
Posts: 135
Joined: Wed Aug 02, 2017 6:07 am

avoid "divide by zero" prg stop

Postby BT454 » Tue Dec 18, 2018 2:25 pm

Hi all,
I'm running a job that has many loops and nested loops where I am dividing by zero. How can I allow for the prg to finish without stopping when encountering the divide by zero?
Thanks,
Bob

EViews Matt
EViews Developer
Posts: 560
Joined: Thu Apr 25, 2013 7:48 pm

Re: avoid "divide by zero" prg stop

Postby EViews Matt » Tue Dec 18, 2018 5:02 pm

Hello,

You can increase the number of errors allowed before EViews terminates the program (the default is one). The "Run Program" dialog has a field for "Maximum errors before halting:", which you can simply change to a large value. Alternatively, within a program you can adjust the maximum via the command "setmaxerrs", e.g.,

Code: Select all

setmaxerrs 10000


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 31 guests