Thomas Cornelissen <[email protected]> reports,
> I get an error message after using sizeof(X) in Mata. [...]
>
> : X=J(100,100,3)
>
> : sizeof(X)
> 'sizeof' found where almost anything else expected
> r(3000);
I just got the same message and, since Thomas is doing nothing wrong,
it's a bug which we will fix in the next executable update.
I just traced it down and here's what happened: the word -sizeof- was
mistakenly added to Mata's reserved-word list at the last minute and even made
it into the help file! See -help m2 reswords-; as explained there, we reserve
some words for future development. -sizeof()-, however, should not have been
on the future-development list because function sizeof() does exactly what it
is that the word was reserved for. Anyway, that inside the code -sizeof- was
recorded as reserved stopped the function from working. -sizeof- will be
removed from the reserved-word list, and from the help file.
-- 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/