seterr

For questions regarding programming in the EViews programming language.

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

johansamuelsson
Posts: 165
Joined: Thu Mar 03, 2011 10:07 pm
Contact:

seterr

Postby johansamuelsson » Wed Mar 01, 2023 10:02 am

How does the seterr command works, I don't really understand the manual? Someone that have some short exampelcode?

Thanks, greetings Johan

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

Re: seterr

Postby EViews Gareth » Wed Mar 01, 2023 12:03 pm

Its just a way of setting an error if the user of your program does something wrong, so that the program stops. It only really makes sense in add-ins.

Code: Select all

create u 100 %x = "" !result = @uiedit(%x, "Type an integer") !val = @val(%x) scalar a = !val if !val=NA or !val<>@round(!val) then seterr "I told you to type in an integer" endif


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests