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

Re: st: Macro format


From   Jean-Benoit Hardouin <[email protected]>
To   [email protected]
Subject   Re: st: Macro format
Date   Fri, 29 Apr 2005 21:13:29 +0200

And the simpler way is to write
. local month 01
. di "`month'"

Jean-Benoit Hardouin

Jean-Benoit Hardouin a �crit :

Try
. local month="01"
. di "`month'"

. di `month' display the result of `month' as a number, but . di "`month'"
display the macro as a string

Jean-Benoit Hardouin




Thomas Speidel a �crit :


Dear Statlisters:

I would like to store the number or string 01 to a local macro.
However, typing:
. local month=01

will produce:
. disp `month'
1

Other ways I tried include:
. local month="01"
. local `month'="01"

Any suggestions?


This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.

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






--
***************************************************************************
Jean-Benoit Hardouin
Biostatisticien
Observatoire R�gional de la Sant� du Centre
BP 2439
1, rue Porte Madeleine
45032 Orl�ans Cedex 1
t�l : 02 38 74 48 80
fax : 02 38 74 48 81
Email : [email protected]
**************************************************************************

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