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 Jason, EViews Moderator, EViews Matt
-
- EViews Developer
- Posts: 563
- 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
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.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: naming samples in a program
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 38 guests