Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | E Michael Foster <emfoster@uab.edu> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | RE: st: -choke- |
Date | Fri, 13 Apr 2012 22:52:16 +0000 |
Yea, this has probably reached the stage of silly -- but yea, I was trying to keep it from showing an ugly return code What I had wanted was for stata to stop executing (and remain open if running interactively When I say interactively, I mean I launch it from ultraedit using C:\progra~2\Stata12\StataMP-64.exe do "%f" In true batch mode, the command has the /e flag -- 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 V: 205.934.6776 F: 815.550.1470 "The Author of all things watches over me," Mattie concludes, "and I have a good horse" True Grit -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Austin Nichols Sent: Friday, April 13, 2012 11:23 AM To: statalist@hsphsun2.harvard.edu Subject: Re: st: -choke- E Michael Foster <emfoster@uab.edu> : Perhaps error 5000 or somesuch? Do you object to the display of an unadorned return code? On Fri, Apr 13, 2012 at 12:18 PM, E Michael Foster <emfoster@uab.edu> wrote: > Thanks for taking the time to attend to a fairly frivolous point, but > at this point, I'm in for a penny, in for a pound, as they say > >>So I think it's time to define chock.ado. >> >>program define choke >> di "Mike says to stop!!!!" >> qui stoprightnow >> end >> >>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 >> r(199); >>yet, if I use -cap- execution proceeds. >> >>Suggestions? > >>>> Couldn't you just have an -exit- command? > > -exit- doesn't quite do it either. IN some instances, I'm running > code in stata while it's open and don't want the program to close Any ideas? > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/