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

RE: st: Dropping programs

From   Richard Williams <[email protected]>
To   [email protected]
Subject   RE: st: Dropping programs
Date   Sun, 27 Mar 2005 09:23:48 -0500

At 10:37 PM 3/26/2005 -0600, Jun Xu wrote:
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.

Thanks Jun. I still wonder if I am doing something wrong or missing something obvious, as I've seen other programs start with -capture program drop progname-.

Anyway, I have found a solution. I've written a program whose sole function in life is to call the program I am editing/debugging:

program define x
capture program drop myprog
myprog `0'

* For searches and help try:

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