[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: how to use macro `using' in a program which calls for mata function
Oleksandr Shepotylo <email@example.com> 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-.
* For searches and help try: