Ben Jann <[email protected]> has found a bug in Mata (he called
it an inconsistency):
. mata
: if (.) 1
> else 2
1
: if (!.) 1
> else 2
1 <-- Mata should display 2
: end
Logical operators in Mata should work the same way they do in Stata:
0 means false and all other values (including missing) mean true.
Hence, the expression (!.) should evaluate to 0. Instead, it is
evaluating to missing value.
I checked out the other logical operators (& and |) and they worked as
intended. It is just ! that has the problem.
We will fix it in the next executable update.
-- 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/