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

Re: st: macro - expansion problem


From   Fred Wolfe <fwolfe@arthritis-research.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: macro - expansion problem
Date   Sun, 13 Feb 2005 09:39:01 -0600

At 08:39 AM 2/13/2005, you wrote:
can you put -char()- into this?
No, it doesn't work.

The problem is the ":". There doesn't seem to be a way to get " " around it when you pass it from the file program into what will become a help file.

I found a work around: using \directory_name\ as opposed to c:\directory_name\

So it goes.

Thanks,

Fred




On Sat, 12 Feb 2005 10:22:28 -0600, Fred Wolfe
<fwolfe@arthritis-research.org> 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
> 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/
>


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

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