This is to flag a small backward compatibility issue with the super-useful -distinct- command by Nick Cox.
When doing
where varname has all missing values, the current version (1.4.1, created on 10 October 2020) of the distinct command displays
It produces no error, and does not define the scalars r(ndistinct) and r(N).
On the other hand, in a previous version of the command (1.2.1, from 1 March 2012), these were defined, and r(ndistinct) was simply set to zero.
This inconsistency broke my code recently. Fixing it was easy, but I wanted to flag the problem. My personal preference is for the old behaviour, but perhaps Nick had good reasons to change it?
When doing
Code:
distinct varname
Code:
note: no distinct values satisfy specification
On the other hand, in a previous version of the command (1.2.1, from 1 March 2012), these were defined, and r(ndistinct) was simply set to zero.
This inconsistency broke my code recently. Fixing it was easy, but I wanted to flag the problem. My personal preference is for the old behaviour, but perhaps Nick had good reasons to change it?

Comment