Statalist


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

Re: st: Compund quotes and the -file write- command


From   "David Elliott" <[email protected]>
To   [email protected]
Subject   Re: st: Compund quotes and the -file write- command
Date   Mon, 20 Aug 2007 15:02:11 -0300

I had provided this on Aug 9th, but when I scanned the Archive I
realized it had ended up in Statalist Limbo:

I'm wondering if escaping the interior ` (as a \`) would work:

-file write `handle' `"capture label variable `=VarName[`x']'
\`"`=VarLabel[`x']'"' "' _n-

I find the display command can often be used to preview the results of
file write so you can test:

-di `"capture label variable \`"zTree (or other) Session ID
(alpha-numeric)"' "'-

which produces:

capture label variable `"zTree (or other) Session ID (alpha-numeric)"'
, the desired output.

D. C. Elliott
*
*   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