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: passing argument(s) to Mata constructors


From   Phil Schumm <pschumm@uchicago.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: passing argument(s) to Mata constructors
Date   Wed, 27 Feb 2013 09:38:55 -0600

On Feb 27, 2013, at 9:19 AM, jcoveney@bigplanet.com wrote:
> It's far from ideal, but you can pass them into constructors via external global variables.


Thanks.  Alternatively, you can use a factory function that takes arguments, and returns a fresh instance of the class suitably initialized (i.e., based on the arguments passed to it).  That's what I wound up doing in this case.


-- Phil


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