if varx evaluates to TRUE if varx is missing, so if varx is a binary variable, your command will be executed for observations where varx is equal to 1 and where it's missing. This is probably not what you want.
Later versions of Stata support extended missing values such as .a and .b Some datasets use these extended missing values to differentiate between different reasons why the value is missing (for example .a might mean "don't know" while .b means "not applicable.") All of these extended missing values are counted by Stata as being greater than any number so if you want to restrict your command to observations where varx is not missing, use if varx < . to be safe. Similarily, if you want to drop all observations where varx is missing, use drop if varx >= . instead of drop if varx == .
last modified: 2 May 2007