Use -string- with the display format argument. For example
. disp string(12000000078, "%12.0f")
12000000078
Sergey
"Lee Chuntao"
<[email protected]> To: <[email protected]>
Sent by: cc:
owner-statalist@hsphsun2. Subject: st: string function
harvard.edu
06/09/2004 12:47 PM
Please respond to
statalist
Hello Listers,
I accidentally find that the following line returns a not wanted results
in my computer. Can u tell me what is the reason?
. disp string(12000000078)
1.20e+10
. disp string(00000000)
0
. disp string(10000000)
1.00e+07
. disp string(1000)
1000
. disp string(1000)
1000
. disp string(10000)
10000
. disp string(100000)
100000
. disp string(1000000)
1000000
. disp string(10000000)
1.00e+07
BTW, I use Stata 7.0 SE.
the display is not what i expected when the number is more than 7 digits
CAN U HELP ME?
THANKS
LEE CHUNTAO
*
* 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/
*
* 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/