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

RE: st: Dropping programs


From   "Jun Xu" <[email protected]>
To   [email protected]
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 <[email protected]>
Reply-To: [email protected]
To: [email protected]
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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index