Statalist The Stata Listserver


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

st: RE: forward vs backward slash in path names


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: forward vs backward slash in path names
Date   Mon, 6 Feb 2006 15:41:53 -0000

Say rather that Stata is always happy
to let Windows users employ / instead 
of \ in path names. 

Other than that, I believe your statement to 
be false. Try dividing with backward slashes! 

See [U] 18.3.11. 

Nick 
[email protected] 

Sascha O. Becker
 
> I always thought that the "/" (slashes) can be either forward or 
> backward - Stata doesn't distinguish between them.
> 
> However, in the following case, they produce very different results:
> 
> foreach file in comp cons fami {;
>     capture use "$root/orig/`file'1976";
>     foreach num of numlist 1978(2)2004 {;
>        capture append using "$root/orig/`file'`num'";
>     };
> };
> 
> works fine.
> 
> However, the backslash version "$root\orig\`file'`num'"
> reads orig\`file'`num' as "orig`file'`num'" (a file which does not 
> exist), i.e. seems to ignore the backslash altogether.
> 

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