[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: Testing & modifying ado file without reloading data set
The first error message tells you exactly what
Stata thinks the problem is, namely that
the file: progtest.ado
the program: progtest
by a line
program define progtest
at the head of the ado file. As you don't show
us the file, I can't comment further.
I find it very difficult to believe
that rebooting was necessary, although it
should have been sufficient to fix this problem.
Also, there is no reason to distrust -discard-.
I have used it many thousand times without
problem. -program drop- is really the
same solution: -discard- merely does more.
I can't follow the rest. I don't think
you need any extra commands other than
those you mention.
Thanks to Rich Goldstein, Thomas Steichen and Nick Cox for their inputs.
Rich's suggestion -discard- from the Stata's command line: did something
(I don't know what in my context, though I know what -discard- supposed
to do from the manual), but the next time (right after -discard-) I
invoke my ado, I received the following message:
.progtest var1 var2 var3
unrecognized command: progtest not defined by progtest.ado
and thereafter, I was not able to invoke the said ado file until I
rebooted my computer. Not even clear or exiting and restarting new Stata
session allowed me to invoke the ado file again, each time giving me the
same error message; following this, I have not used -discard-.
Thomas' suggestion of -program drop adoname- from the command line
worked. I tried this before asking the listers albeit by inserting it on
top of the line of the ado routine as -capture program drop adoname-
instead of using it on the command line. Since the ado is loaded into
the memory, this obviously explained why my attempt did not work.
Which brings me to the next point: is there a temporary command that I
can insert top or bottom of the line of my ado routines to say something
like -clear this version of ado from the memory- jsut for temporary use
in this testing period? I ask this for my own education. I started with
having to -clear- and reload my data set to test my ado, this has been
shortened by -program drop adoname- courtesy of Thomas's suggestion so
anything is a bonus now but would be appreciated.
* For searches and help try: