Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: tostring double wishlist


From   NBER Test <[email protected]>
To   [email protected]
Subject   st: tostring double wishlist
Date   Tue, 4 Nov 2003 10:01:25 -0800 (PST)

Hi,

I had a bit more trouble than I anticipated converting
a 12-digit double to a string.  The string and number
are below:

     +--------------------------+
     |        ssuid      ssuidn |
     |--------------------------|
  1. | 019003754630   1.900e+10 |
     +--------------------------+

A simple tostring command gives the results below:

. tostring ssuidn, gen(ssuidc) force
ssuidc generated as str11
ssuidc was forced to string; some loss of information

. list ssuidc in 1/1

     +-------------+
     |      ssuidc |
     |-------------|
  1. | 1.90038e+10 |
     +-------------+

expressed in scientific notation rather than like
'019003754630' above.

Thanks

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
*
*   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