Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > Newline


First Prev [ 1 2 ] Next Last

In computing, a newline is a special character or sequence of characters indicating the end of a line. The name comes from the fact that the next character will appear on a new line — that is, on the next line below the text immediately preceding the newline.

Depending on the style used, "single-spaced" text may contain one newline between adjacent paragraphs, in which case the second paragraph is usually indented, or two newlines between paragraphs with no indenting (the default in web browsers). Other variations exist.

1 Methods

Software applications and operating systems usually represent the newline with one or two control characters. Most systems use either LF ( Line Feed) or CR ( Carriage Return) individually, or CR followed by LF (represented by CR+LF).

When a program 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.

Some mainframe operating systems still use EBCDIC, an IBM-proprietary 8-bit encoding that is completely incompatible with ASCII. In EBCDIC, the "Next Line" (NEL) code at X'15' is the typical end-of-line character.

On rare occasions, newlines are also called line anchors or line breakers, reflecting differing views of the purpose of newlines; a newline may be considered a line separator or a line terminator. This is similar to the question of whether semicolons separate or terminate statements in the syntax of programming languages. Although most of the time the difference in interpretation is inconsequential, a newline at the end of a file can be troublesome. Most programs do not consider such a newline to introduce a new line after that character, but some do.

1.1 History

ASCII was developed simultaneously by the ISO and the ASA, the predecessor organization to ANSI. During the period 1963Events January-March January 11 The Whisky A Go-Go night club in Los Angeles, the first disco in the USA, is opened. January 14 George Wallace becomes governor of Alabama. January 22 Elysee treaty between France and Germany January 28 Black student Harvey- 1968Events Undated Booker Prize for Fiction is established by Booker plc. 1968 is known as the year of the Prague Spring and also the year of the Paris riots. The ASCII character code is standardized as ANSI Standard X3. Nauru adopt his national anthem of the, the ISO draft standards supported the use of either CR+LF or LF alone as a newline, while the ASA drafts supported only CR+LF. The MulticsMultics Mult iplexed I nformation and C omputing S ervice) was an extraordinarily influential early time-sharing operating system. Overview Initial planning and development for Multics started in 1964. Originally it was a cooperative project led by MIT (w operating system began development in 1964Events January January 1 Federation of Rhodesia and Nyasaland is dissolved. January 3 Senator Barry Goldwater announces that he will seek the Republican nomination for President. January 5 In the first meeting between leaders of the Roman Catholic and Ort and used LF alone as its newline. UnixUNIX (or Unix is a portable, multi-task and multi-user computer operating system originally developed by a group of AT&T Bell Labs employees including Ken Thompson, Dennis Ritchie and Douglas McIlroy. Unices The term Unices includes Unix and Unix-like ope followed the Multics practice, and later systems followed Unix.

The sequence CR+LF was in common use on many early computer systems that had adapted teletype machines, typically a 33ASR , as a console device, because this sequence was required to position those printers at the start of a new line. On these systems text was often routinely composed to be compatible with these printers. The separation of the two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in one-character time. That is why the sequence was always sent with the CR first. In fact, it was often necessary to send CR+LF+NUL (ending with the control character indicating "do nothing") to be sure that the print head had stopped bouncing. Once these mechanical systems were replaced, the two-character sequence had no functional significance, but it has persisted in some systems anyway.





Non User