Encyclopedia > Newline

  Article Content

New line

Redirected from Newline

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:

  • Cygwin - Depends on how it was installed
  • Virtual Memory System (VMS) - Has many text file formats. The default is "Variable Length Record". Format is specified by the "Record format" field of the file's directory entry. Variable Length Record, CR LF, CR, LF, Fixed Length Record, etc.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Kings Park, New York

... 6.21% water. Demographics As of the census of 2000, there are 16,146 people, 5,480 households, and 4,197 families residing in the town. The population density is ...

 
 
 
This page was created in 24.7 ms