Some words about editors, tabs, eolchar, eofchar.
The editor which I like most does the following:
- read files that have CRLF eols or LF eols
- output files with CRLF or LF, controlled by an editor setting
- output an EOF char, if desired (0x1a); most of the time, I don't want it
- allow individual tab settings (of course), either by specifying the
tab positions
or by specifying an increment
- translate tabs to spaces during reading, if desired
- translate tabs to spaces during writing, if desired
- translate spaces to tabs during writing, if desired (well, I wouldn't
use that)
- omit trailing blanks, if desired
- or: set all records to a fixed length, controlled by editor option
(filling with blanks
or truncated, if necessary)
Most (simple) editors don't have such features, but if you use the editor
to prepare for example data files for input and the programs you have rely
on such specific details of the input files, you are happy if you have
an editor
at hand that allows you to do the necessary modifications.
Another remark regarding tabs in (source) files:
they have no meaning to the compilers etc.; the compilers treat them like
spaces in the best case. So the only reason for having them in the source
is for formatting purposes, and that - as we pointed out already - does not
work, because the tab settings at the time of the creation of the file
are not
known, so you will get garbage (for the human reader) in the general case.
That's why we should IMO avoid tabs in source files. Sometimes I get
C programs which I have to port to z/OS, for example; one of the first
steps is:
remove the tabs in the sources, restore the indentation of the source and
limit the source line length to 72 or 80. At least, I invest some time
to do this,
if I plan to take the responsibility for those programs for a longer
time and
if I have to pass them through our normal change management and
source archive systems.
Kind regards
Bernd
Am 13.01.2014 00:28, schrieb Paul Gilmartin:
On Sun, 12 Jan 2014 15:48:49 -0600, Kirk Wolf wrote:
On Linux gedit works fine, on Windows I use Notepad++ which handles Unix
eols and UTF-8
You mean I don't have to wait for Windows 14!? Thanks!
Does it do UNIX eols on in put *and* output? Wordpad only does the
former.
Thanks again,
gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN