[TUHS] Why is \n 012?

M. Warner Losh imp at bsdimp.com
Sun Mar 9 16:19:22 AEST 2003


In message: <040b01c2e5f0$03000580$6401a8c0 at gregnewport>
            "Greg Haerr" <greg at censoft.com> writes:
: > A thing that has puzzled me almost for ever is why the newline
: > character in C is 012 and not 015.  Does anybody have any insight?
: 
: Well, my take on this is that C was developed with UNIX,
: of course, and UNIX early on decided to use a single
: character rather than a two-char (CRLF) sequence for
: end-of-lines.  So, since the CR was already in use for 
: the leading char in the two-char sequence, it made it a lot
: easier to use the LF character for the single newline, so
: programs wouldn't always have to be checking a second
: character...

Also, it is not possible to do overstriking w/o <BS> if you can't use
<CR> for the task.

Warner



More information about the TUHS mailing list