Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Program error after installing Stata 12.1 for the MAC.


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   Re: st: Program error after installing Stata 12.1 for the MAC.
Date   Wed, 1 Feb 2012 16:00:18 -0600

On Feb 1, 2012, at 2:43 PM, Fred Wolfe wrote:
> No, the previous version did have a newline. I always put in a newline! So, it worked on 12.0 OSX 10.72, but did not work on 12.1. I did verify that there was a newline. What made it work was adding another newline.

On Feb 1, 2012, at 3:10 PM, Philip Ender wrote:
> I just tested it on another ado program and it happened again.  Adding a second blank line allows the ado program to run.


I believe this may be a function of the EOL characters in the file.  I just checked, and on my machine (Stata 12.1 born 30 Jan 2012), a single final newline is sufficient provided that the file uses linefeed as the EOL character (standard under Unix/Linux, and now under OS X).  However, if the file is saved with carriage returns instead, then two final newlines are required to get Stata to load the ado-file.  I believe that some text editors on OS X still don't use linefeed by default, and this would have been more likely if you had edited the file some time ago.

You can convert from CR to LF with

    tr '\r' '\n' < old_file.ado > new_file.ado

or via -filefilter- from within Stata.


-- Phil


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index