Statalist


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

st: adding quotes to a macro or variable


From   Laura Gibbons <gibbonsl@u.washington.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: adding quotes to a macro or variable
Date   Mon, 17 Mar 2008 14:18:54 -0700 (PDT)

Is there any way I could change a macro value from xxx to "xxx".

.local l="xxx"
.di "`l'"
xxx

I want the macro to actually be "xxx", including the quotes. I've tried adding them around with no success, and things like

. local l="xxx"

. local l='"`l'"'
'"xxx"' invalid name
r(198);

But as you can see I'm in need of help. I'm in version 10 on Windows XP.

thanks- Laura

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laura E. Gibbons, PhD
General Internal Medicine, University of Washington
Box 359780, Harborview Medical Center, 325 Ninth Ave, Seattle, WA 98104
phone: 206-744-1842, fax: 206-744-9917, Office address: 401 Broadway, Suite 5122
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index