Page 1 of 1

seterr

Posted: Wed Mar 01, 2023 10:02 am
by johansamuelsson
How does the seterr command works, I don't really understand the manual? Someone that have some short exampelcode?

Thanks, greetings Johan

Re: seterr

Posted: Wed Mar 01, 2023 12:03 pm
by EViews Gareth
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