Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Avoiding use of Mata external variables in large programs


From   [email protected] (Rafal Raciborski, StataCorp)
To   [email protected]
Subject   st: Avoiding use of Mata external variables in large programs
Date   Fri, 10 May 2013 12:39:03 -0500

Michael Lacy <[email protected]> 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
[email protected]

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index