Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Generating intermediate output with a program that calls a mata function


From   Matthew Baker <matthew.baker@hunter.cuny.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Generating intermediate output with a program that calls a mata function
Date   Wed, 18 Jul 2012 20:16:57 -0400

Daniel --

Thanks very much - that seems to do the trick! And it is much more
elegant and consistent with the spirit of mata than the approach which
I was using, which was to insert in the mata code a call to stata,
like:

stata(`"display "." _continue"')

which also seemed to do the trick.

Thanks again,

Matt Baker

On Wed, Jul 18, 2012 at 5:19 PM, daniel klein
<klein.daniel.81@googlemail.com> wrote:
> Matt,
>
> instead of
>
> printf("Case done")
>
> try
>
> printf("Case done \n")
> displayflush()
>
> This is documented in -help mata printf-
>
> "One of the purposes of the iteration output is to keep the user
> informed that the code is indeed working, yet as the above code is
> written, the user probably will not see the iteration messages as they
> occur.  Instead, nothing will appear for a while, and then,
> unexpectedly, numerous iteration messages will appear as Stata,
> buffers full, decides to send to the terminal the waiting output.
>
> To force output to be displayed, use [M-5] displayflush():"
>
> Best
> Daniel
> *
> *   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/



-- 
Dr. Matthew J. Baker
Department of Economics
Hunter College and the Graduate Center, CUNY
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index