Oleksandr Shepotylo <[email protected]> had a problem using Mata
from an ado-file. His problem has been solved.
In his original posting, he called from his ado-file a Mata function he had
written by coding
mata spatlag("var", "newvar", `"`using'"')
Oleksandr should change the line to read
mata: spatlag("var", "newvar", `"`using'"')
That is, add a colon after the word -mata-.
-mata- without a colon is a great way to use Mata interactively.
-mata- with a colon is the right way to use Mata in ado-files.
This way, if there is an error in the Mata function, or if the user presses
Break while the Mata function is executing, the ado-file will know of the
problem and will stop executing. See -help [m3] mata-.
-- Bill
[email protected]
*
* 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/