Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: dangerous preserve


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: dangerous preserve
Date   Tue, 22 Apr 2008 21:18:36 -0400

On 4/22/08, Joseph Coveney <[email protected]> wrote:
> Sergiy Radyakin wrote (excerpted):
>
> (How wonderful programming in Stata
> could have been, if -capture- didn't do two things at once:
> 1. suppress the output
> 2. get the error code
> These tasks should be performed by two different commands)
>
> --------------------------------------------------------------------------------
>
> Doesn't -capture noisily- show the output?  I'm obviously missing something,
> here.  Could you tell me what it is?

It does! Thank you Joseph. Including noisily between capture and the {
} allows both to capture errors and have the output. Life is wonderful
again!

capture noisily {
  display "Hello World"
  error 100
}

display _rc

Thank you, Sergiy Radyakin


>
> Joseph Coveney
>
*
*   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