Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
E Michael Foster <email@example.com>
Fri, 13 Apr 2012 01:39:34 +0000
Whenever I change jobs (and that's not infrequently), my students encounter a programming command that surprises them. It's my -choke- command.
I stick it in code to run part of a do file and stop execution at a point in the code. It returns an error and the student(s) think they've done something wrong.
I understand that I could submit part of a do-file by selecting it within the Stata do-file editor. But I don't use it. I use ultraedit.
So I think it's time to define chock.ado.
program define choke
di "Mike says to stop!!!!"
This doesn't quite work because I don't want anything other than "Mike says to stop!!!" in the log.
I'd like to suppress the error message:
unrecognized command: stoprightnow
yet, if I use -cap- execution proceeds.
E. Michael Foster
Professor, Department of Health Care Organization and Policy
Department of Biostatistics
School of Public Health
The University of Alabama at Birmingham
Editor, Evaluation Review
1530 3RD AVE S
Birmingham, AL 35294-0022
320 Ryals Public Health Building
1665 University Boulevard
"The Author of all things watches over me," Mattie concludes, "and I have a good horse"
* For searches and help try: