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

st: Re: foreach syntax


From   Christopher F Baum <[email protected]>
To   [email protected]
Subject   st: Re: foreach syntax
Date   Fri, 23 Jul 2004 07:06:58 -0400

On Jul 23, 2004, at 2:33 AM, Debra wrote:



Thanks, but that was just an unfortunate typo in my e-mail. Here's exactly
the code which failed. Note the input line fails before I even get to the
save. I've just checked (again) that the files are where I think they are
(ie, d:\Data\CGSData\owner00r.wb2 does exist.) Sorry for not being clear
the first time.

******
inputst d:\Data\CGSData\owner00r.wb2
. clear
As other threads on the list have made clear, it is much easier to get away from these problems by abandoning the DOS \ in favor of the more common /. That is, Stata will properly interpret d:/data/cgsdata/ownerr00r.wb2
even if it is running on a DOS platform, and using forward slashes removes the confusion with local macros. This has the added advantage that it is much easier to write platform-independent code, since every other OS supported by Stata will understand a filename containing forward slashes. So when you see the light and set up that Intel box to boot into Linux instead...

Kit

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