This is only a a minor annoyance but when I re-run a program that contains a sample I created, the program stops saying that sample already exists. Is there a way around that other than commenting out the sample creation line?
Thanks
naming samples in a program
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Matt
- EViews Developer
- Posts: 583
- Joined: Thu Apr 25, 2013 7:48 pm
Re: naming samples in a program
Hello,
You can condition the sample creation statement with an @isobject check, that way the sample object will only be created if it doesn't already exist:
If the sample is dynamic (possibly changing each time you run the script), you could do something similar to reset or delete and recreate the sample object instead.
You can condition the sample creation statement with an @isobject check, that way the sample object will only be created if it doesn't already exist:
Code: Select all
if not @isobject("foo") then
sample foo ...
endif
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: naming samples in a program
I always just throw a
At the top of the program
Code: Select all
D(noerr) objectname
Who is online
Users browsing this forum: No registered users and 2 guests
