News:

alphaMELTS 1.9 is available at the download and information site.
alphaMELTS 2 standalone & for MATLAB/Python are available on request
(see the Version 2 tab on the download site for more details).
For news of all MELTS software see the MELTS Facebook page.

Main Menu

Fun with line endings (or not)

Started by Paula, July 23, 2011, 05:28:59 PM

Previous topic - Next topic

Paula

As of July 22nd: I am in the process of documenting Adiabat_1ph 3 so that it may be released very soon. To that end I am posting some tips and examples etc....

In Linux / Unix, line endings are marked by the 'Line Feed' character (ASCII character 10; '\n'). On Macintosh computers, line endings have traditionally been denoted with the 'Carriage Return' character (ASCII character 13; '\r'; sometimes displays as '^M' or a small box). Windows computers use a 'Carriage Return' followed immediately by a 'Line Feed'.

The situation was further complicated with the introduction of Mac OS X as this is a form of Unix and, within the 'Terminal' program, it uses the Unix line-endings; so in earlier versions it was possible for adiabat_1ph and / or run_adiabat.pl to not work correctly, even though they were running on the same machine used to edit the input files. Newer versions of Microsoft Word for Mac give detailed line-ending options when saving as plain text and the free command line editor Nano, which is installed by default on Mac OS X, is also line-ending aware.

Adiabat_1ph and run_adiabat.command should tolerate incorrect line endings on most of their input files but there could well be exceptions. Some of the other scripts, e.g. column_pick.command, will warn if a file appears to have the wrong line endings. But if you seem to be getting random errors with input it's worth running file_format.command on all the text files you are using.

Paula