Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: Re: st: How can I add leading zeros conditionally?


From   ainsley charles <[email protected]>
To   [email protected]
Subject   Re: Re: st: How can I add leading zeros conditionally?
Date   Mon, 20 Feb 2006 07:07:39 -0800 (PST)

Thank you, Nick.

Cheers,

Ainsley

>>> 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.

Nick
[email protected]



__________________________________________________
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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index