Thank you all for your kind responses. Indeed, using double solved this
annoying and important problem (the numbers are id numbers of patients). I
think that double (not float) should be a default setting in STATA. Saving
some memory is an important issue for only a small percentage of problems.
Andrzej
In general, it is better to hold IDs as string variables to make sure they
are exactly what you think they should be -- regardless of how many digits
they may have or other issues like leading zeros. The default float vs.
double issue comes up fairly often. Perhaps the manuals should highlight
this issue more and also the fact that you can change the default to double.