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]

st: Avoiding use of Mata external variables in large programs


From   rraciborski@stata.com (Rafal Raciborski, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   st: Avoiding use of Mata external variables in large programs
Date   Fri, 10 May 2013 12:39:03 -0500

Michael Lacy <Michael.Lacy@colostate.edu> has a follow up question regarding
passing objects bewtween Stata and Mata:

> And, although this is not stated directly, I'd like to check my understanding 
> that the purpose of creating the m1 and m2 in one program but using them in 
> another is so that, if -mysub- fails, there will still be a program (-mymain-) 
> that knows their names so that they can be cleaned up. On that view, the 
> sole purpose of the -mymain- to -mysub- chain is to ensure this ability to 
> clean up in case of error?

Once -mysub- terminates (successfully or not), you want to make sure that
-mymain- drops from Mata memory the objects that `m1' and `m2' refer to.

-- Rafal
rraciborski@stata.com

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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