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: beginer's mata function in dofile


From   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: beginer's mata function in dofile
Date   Wed, 8 Aug 2012 12:40:34 +0200

Tashi,

there is nothing I can really add to that statement. The critical
point is to define/compile the Mata function before you call it. This
do-file works, without a -program- being defined.

m :
void myfunc(real scalar x)
{
    x
}
end

loc x 42
m : myfunc(`x')

Best
Daniel

-- 
The only thing I didn't follow is where you say... it is not necessary
to define a program that calls mata functions. Could you elaborate on
that?
*
*   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