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

Re: st: adding quotes to a macro or variable

From   Keith Dear <>
Subject   Re: st: adding quotes to a macro or variable
Date   Tue, 18 Mar 2008 08:34:38 +1100

You can do this using compound quotes:

. local l `""xxx""'
. mac list _l
_l:             "xxx"

See -help quotes- for more.

At 08:18 AM 18/03/2008, you wrote:
Is there any way I could change a macro value from xxx to "xxx".

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

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

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:

Dr Keith B.G. Dear
Senior Fellow in Biostatistics
National Centre for Epidemiology and Population Health
Australian National University
Canberra, ACT 0200, Australia
Tel: 02 612 54865, Fax: 02 612 50740
CRICOS provider #00120C

*   For searches and help try:

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