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

RE: st: RE: Cross-platform mobility


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Cross-platform mobility
Date   Mon, 22 Sep 2003 21:21:47 +0100

Danielle H. Ferry

> > I am not clear quite how this is biting you,
> > but Stata provides a dirsep which depends on
> > your platform. 
> > 
> > In Stata 7, this is accessed by `: dirsep'
> > and in Stata 8 by `c(dirsep)'.
> 
> I don't understand what you are referring to. The problem I 
> have is that
> suppose I write a do-file that has one line that looks like this:
> 
> use :C:stata:auto, clear
> 
> This will work fine when I run on my Mac. If I try to run 
> on a PC, however,
> I will have to change the line to:
> 
> use C:\stata\auto, clear
> 
> Each time I go back and forth between the Mac & PC, I will 
> have to change
> the way the pathname is specified.

In this particular case, 

. sysuse auto 

is cross-platform. 

More generally, type this 

. di "`c(dirsep)'" 

under both platforms to see what it is. 

Alan Riley has very good suggestions, 
which make coding -dirsep- irrelevant. 

Nick 
n.j.cox@durham.ac.uk 
*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index