Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Dropping programs


From   "Jun Xu" <mystata@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: Dropping programs
Date   Sat, 26 Mar 2005 22:37:37 -0600

I think you probably have to rerun the ado file or discard it first. I think that's way how it works. Though you specified cap program drop myprog in the ado file, without truly running the ado file, this line is not executed by simply overwriting the old ado file. The old ado version is still in memory. My guess is that once an ado command is executed, it's in memory and unless you EXECUTE (do myprog.ado) the new version or tell Stata to discard, Stata won't execute the newly updated ado. Others might have comments.

Jun


From: Richard Williams <Richard.A.Williams.5@nd.edu>
Reply-To: statalist@hsphsun2.harvard.edu
To: statalist@hsphsun2.harvard.edu
Subject: st: Dropping programs
Date: Sat, 26 Mar 2005 20:06:35 -0500

I'm trying to debug an ado file. Every time I make a change and save the file, I have to drop the program or use the -discard- command or else the old version in memory still gets used by Stata. But, I thought if I started the program with

-capture program drop myprog-, e.g.

capture program drop myprog
program define myprog
display "Hi!"
end

Then Stata would load the current version from disk rather than use the version in memory. But that is not happening., i.e. every time I make a change I have to discard or drop the old version. Am I missing something obvious? Thanks for any help.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index