Encyclopedia > New line

  Article Content

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:

  • 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
Autocracy

... - Wikipedia <<Up     Contents Autocracy Autocracy is a form of government which resides in the absolute power of a single individual. The ...

 
 
 
This page was created in 37.6 ms