Bill Rising
> Nick also gave a solution for replacing all 0's:
>
> >
> > real(subinstr(string(myvar),"0","",1))
> >
>
This replaces the _first_ zero found.
> If it were known that the last zero were the evil zero,
> this could be
> done via:
>
> real(reverse(subinstr(reverse(string(myvar,%30.0g)),"0","",1)))
>
> (at least if the number is smaller than Stata's longs)
>
Exactly.
*
* 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/