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

st: filenames for -permute using-


From   Roger Harbord <[email protected]>
To   Statalist <[email protected]>
Subject   st: filenames for -permute using-
Date   Mon, 15 Aug 2005 17:22:17 +0100

Hi all (StataCorp programmers in particular!),

I just discovered that a program a wrote under version 7 of Stata has become slightly broken in Stata 9: -metareg- with the -permute(#, detail)- suboption no longer works.

Looking into this i find it now needs quotes around a temporary filename -line 299:

permute `xlist1' `xlist2' using `pm', `level'

- must now be replaced by

permute using `xlist1' `xlist2' using `"`pm'"', `level'

(pm is a local macro holding a the name of a tempfile)

A bit of tracing shows the problem occurs because under Windows the tempfile name contains a colon. This causes problems under Stata 9 because -permute- is now a prefix command and has a colon in its usual syntax, even though the -using- syntax doesn't have a colon.

I have a -version 7- statement at the start of this program. [U] 11.6 "File-naming conventions" says that quotes are required only for filenames containing blanks. I guess to be on the safe side I should always include quotes around tempfile names just in case someone's TEMP directory contains a space, but that seems unlikely (typically will be something like C:\WINNT\TEMP) and i've had no reports of problems before.

Would be very nice if this could be fixed by an official Stata update...

Best wishes,
Roger.

--
Roger Harbord [email protected]
MRC Health Services Research Collaboration
Department of Social Medicine, University of Bristol
http://www.epi.bris.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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index