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

Re: st: macro - expansion problem


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: macro - expansion problem
Date   Sun, 13 Feb 2005 09:39:03 -0500

can you put -char()- into this?

On Sat, 12 Feb 2005 10:22:28 -0600, Fred Wolfe
<[email protected]> wrote:
> I wonder if any Statalister might help me with this problem: using windows
> xp, stata 8.2SE - up to date.
> 
> I am passing a series of file descriptions to the -file- program in the
> macro -fname-.
> 
> They look like:
> 
> c:\statdata\zoster\zoster.hlp
> c:\statdata\analgesic\readme.txt
> 
> <snip>
> file open `wfile' using c:/ado/personal/projects.hlp, write replace
> file write `wfile' "{smcl}" _n
> foreach fname of local dirs {
> file write `wfile' "View {view  `fname'}" _n
> }
> <snip>
> 
> After the program runs, I look in the created help file and see this:
> 
> View \statdata\ADR\adr.hlp
> View \statdata\adrepi\adrepi.hlp
> View \statdata\back\backpain.hlp
> View \statdata\back\fibro.hlp
> View \statdata\back\utility.hlp
> View \statdata\cancerfu\breastcancer.hlp
> View \statdata\cancerfu\cancerfu.hlp
> View \statdata\cancerfu\lungcancer.hlp
> 
> When I click on one of these, I get the following:
> 
> file c not found
> request was:
> 
> view c
> 
> The ":" is being dropped and the  path/file split apart.
> 
> I would like to see:
> 
> View c:\statdata\ADR\adr.hlp
> 
> I have not been able to solve this problem with escape characters "\" or
> macval() or any other text I could think of.
> 
> Does anyone have any suggestions?
> 
> Thanks
> 
> Fred Wolfe
> 
> Fred Wolfe
> National Data Bank for Rheumatic Diseases
> Wichita, Kansas
> Tel (316) 263-2125     Fax (316) 263-0761
> [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/
> 


-- 
Stas Kolenikov
http://stas.kolenikov.name
*
*   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