Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: novice question about programs and Mata


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: novice question about programs and Mata
Date   Fri, 2 Feb 2007 18:26:00 -0500

capture program drop MyLittleProgram
mata: mata clear
program define MyLittleProgram
args one two
mata: venable()
end

mata:
void function venable()
{
one = st_local("one")
one
two = st_local("two")
two
}
end

MyLittleProgram test one


Within Mata, you do not dereference the local macro. You merely pass its quoted name to the st_local function.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index