Statalist The Stata Listserver


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

Re: st: Erreor message after Mata: sizeof()


From   [email protected] (William Gould, Stata)
To   [email protected]
Subject   Re: st: Erreor message after Mata: sizeof()
Date   Wed, 06 Dec 2006 08:39:49 -0600

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/



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