<<Up     Contents

New line

In computing, new line is a special character or a sequence of character indicating the end of an line.

Software applications and operating systems have various conventions for representing the end of a line of text, the so-called newline. This term, to be distinguished from "new line", is used for a code in a text to go to a line, as opposed to a new line that is the result of automatic wrapping by the program that displays the text. It is done with one or two control characters. Most systems use either LF or CR individually, or CR followed by LF. When an OS stores text in a file using ASCII or an ASCII-compatible 8-bit encoding, as is typically the default, these characters are represented with their single ASCII bytes 0A, 0D, or 0D followed by 0A, respectively. However, some mainframe operating systems use EBCDIC, an 8-bit encoding that is completely incompatible with ASCII. In EBCDIC, the "Next Line" (NEL) code at byte 15, hex, is the typical end-of-line character. ASCII does not encode NEL at all, byte 15 happens to be NAK. The following table demonstrates the variations in the end-of-line conventions among OSes:

In C programming language, the fopen function and related functions usually regard CR LF as LF unless a letter b meaning binary is given in mode argument.

NEL:

CRLF:

CR:

LF:

Unclassified:

wikipedia.org dumped 2003-03-17 with terodump