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

Re: st: Re: adding a filename extension


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Re: adding a filename extension
Date   Tue, 11 Oct 2005 14:45:48 +0100

But surely, in this case, looking forward for a period is equivalent to looking backward for a period if we only want to determine whether a period is present. Alan didn't say how Stata decides what part of the filename is the extension, which presumably is the job of the operating environment rather than Stata.

Roger

At 14:30 11/10/2005, you wrote:

I understand why Stata might use this algorithm, but if I had
designed it, I would not have done it that way... "looking forward
for a period" fails miserably on any of my files with names like
directors.tenure.proxy.sep2005.dta, which are perfectly legal under
*nix variants. Searching BACKWARD from the end of the filename would
be a much better way to determine whether there is a file extension.
(That does not preclude Stata making a mistake with a file
lacking .dta, but then it is the user's problem, not Stata's).

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html


On Oct 11, 2005, at 2:33 AM, Allenwrote:

Stata determines whether or not a file has an extension in the same
way across all operating systems.  It starts at the beginning of
the filename and looks forward for a period.  If one is found,
then Stata determines the file has an extension and will not add
one.
*
*   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/

--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
King's College London

5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
  or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://phs.kcl.ac.uk/rogernewson/

Opinions expressed are those of the author, not the institution.

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