Suppressing "... is not defined" message

For questions regarding programming in the EViews programming language.

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

tchaithonov
Posts: 168
Joined: Mon Apr 13, 2009 7:39 am
Location: New York City

Suppressing "... is not defined" message

Postby tchaithonov » Wed Jun 10, 2009 2:12 pm

Hi everyone,

My code-writing project seems to have taken off since Trabutor helped me the last time, but I am facing another problem at the moment. I am writing a subroutine that I hope could be used over and over, and I told eviews to look for a certain variable -- the variable needs first to be created by the main program. So, if I have a different main program that doesn't create that variable, I would receive a warning message from eviews and the program stops from that point. Say the following:

(this is within the subroutine -

Code: Select all

group groupA abc* groupA.drop abc_bkup
If I don't have "abc_bkup" created already (this variable could simply be series abc_bkup = abc), I will have the warning message. I wonder if I could say something like:

Code: Select all

if <abc_bkup exists> = TRUE then groupA.drop abc_bkup endif
Please let me know if you have any idea about this. Thanks much!

Tchaithonov

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

Re: Suppressing "... is not defined" message

Postby EViews Gareth » Wed Jun 10, 2009 3:02 pm

Use the @isobject function.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests