Dear All,
the following document recommends not using semicolon (;) delimiter in Mata:
"We recommend that you do not use Mata when Stata is in #delimit ;
mode. Mata will not mind, but you will confuse yourself."
http://www.stata.com/help.cgi?m2_semicolons
Why does Mata complain in the following example? (see
"mata_des_bug.do" below). Who is confused, me or Mata?
(happens for mata des followed by ; and for mata mosave followed by ;)
Thank you,
Sergiy Radyakin
/* --- begin of mata_des_bug.do ------ */
/* 1. This part works */
#delimit cr
mata mata clear
mata
void function foobar() {
1
}
mata des
end
mata: foobar()
/* 2. This part does not work */
#delimit ;
mata mata clear;
mata;
void function foobar() {;
2;
};
mata des ;
end;
mata: foobar();
/* --- end of mata_des_bug.do ------ */
*
* 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/