Monday, February 20, 2006
Re: Re: st: How can I add leading zeros conditionally?
Thank you, Nick.
>>> N. J. Cox
Let me add one comment to Joseph's characteristically lucid and detailed explanation.
- -string()- and -tostring- are really the same idea at two different levels.
The -string()- function is more fundamental, and does the hard work of converting numbers to strings.
The -tostring- command is, from one point of view, a wrapper for -string()-, as may be seen by glancing at the code:
. viewsource tostring.ado
The difference -tostring- makes is twofold: convenience and protection. You can process several variables at one and there are some safeguards inhibiting you from doing some dopey things.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com * * 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/
Links to this post: