Teach Time Encyclopedia - Learn About Our World
Home Page
Teach Time
Featured Topics

United States
by state

CITYology

Academic Disciplines

Historical Timelines

Themed Timelines

Calendars

Reference Tables

Biographies

How-tos



Saturday, September 06, 2008

New line

In computing, new line is a special character or a sequence of character indicating the end of a 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 (Line Feed) or CR (Carriage Return) 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. (In the 1958 version of ASCII, for which Multics was originally designed, there was a separate newline (NL) character in addition to CR and LF. The 1963 revision combined NL with LF, and Multics followed suit. Unix followed the Multics practice, and later systems followed Unix.)

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. The following table demonstrates the variations in the end-of-line conventions among OSes:

In the C standard I/O library, files can be accessed in either "text" or "binary" mode; when performing input or output in text mode, on a system where lines are not terminated by the C newline character '\\n', the native line termination is automatically translated into a C newline. (This is a legacy of C's historic grounding in Unix, where there is no need for such a distinction.)

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.


Internet Hotel Solutions

Site Sponsors
AC Units
Baltimore Harbor
Boot Camp Grads
Bra Size
Burkittsville
College Hotels
Digital Harbor
Free Cell Phones
Golden Hare Travel
Golf Vacations
Golf Courses
Gourmet
Hair Styles
Hippodrome
iWoman
Lesson Plans
Maryland Hotels
MD Genealogy
Minor League Stuff
Motel Site
Ocean City
OC Real Estate
Old Agers
Office Supplies
Orlando
Pet Friendly Hotel
Room Prices
Savannah, GA
Ski Vacations
South Baltimore
Student Teaching
Travel Sources
University Hotels
Visit Military Bases
Washington, DC

Brought to you by NoChildLeftBehind.com and the Beaches and Towns Network, LLC.