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

st: Macro question


From   Fred Wolfe <fwolfe@arthritis-research.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: Macro question
Date   Tue, 15 Mar 2005 09:12:55 -0600

Can anyone help with this macro question:

In a program syntax statement

syntax, vlist(varlist)

I create a local macro vlist which end up containg:

di"`vlist'"

plaghaq_disability plaghaq2 plagpas

I want to use the contents of that macro in an inlist() function like this:

if inlist(parm,"plaghaq_disability", "plaghaq2", "plagpas")

So I need to transform

this list:
plaghaq_disability plaghaq2 plagpas

into this list:

"plaghaq_disability", "plaghaq2", "plagpas" in a macro. I am having problems adding the quotation marks.

Can anyone tell me how to do this?

Thanks,

Fred Wolfe

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761
fwolfe@arthritis-research.org


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