Carriage return

Carriage return

Carriage return, often shortened to return, refers to a control character or mechanism used to start a new line of text.

Originally, the term "carriage return" referred to a mechanism or lever on a typewriter. It was used after typing a line of text and caused the assembly holding the paper (the carriage) to return to the right (assuming a left-to-right language), so the machine was ready to type again on the left side of the paper. The lever would also usually advance the paper to the next line. The first power carriage return was added to electric typewriters by Smith Corona in 1960. The key for this was usually labeled "carriage return" or "return". With typewriters like the Selectric, where the type element was moved when typing and the paper held stationary, the key returned the type element to the left and the term "carrier return" was sometimes used for this function.

To improve the keyboard for non-English-speakers, the symbol (U+21B5) was introduced to mark this key, since this graphic could communicate the action of the key without using words.

Computers

In computing, the carriage return (CR) is one of the control characters in ASCII code, Unicode, EBCDIC, or many other codes. It commands a printer or other sort of output system such as a display to move the position of the cursor to the first position on the same line. It was mostly used along with line feed, a move to the next line, so that together they start a new line.

The carriage return and line feed functions were split for two reasons:

  • Carriage return by itself provided the ability to overprint the line with new text. This could be used to produce bold, underscores, accented characters, strike out text, and some symbols.
  • Early mechanical printers were too slow to return the carriage in the time it took to process one character. Therefore the time spent sending the line feed was not wasted (often several more characters had to be sent to ensure the carriage return had happened before sending a printing character). This is why the carriage return was always sent first.

As early as 1901 Baudot code contained separate carriage return and line feed characters.

Many computer programs use the carriage return character, alone or with a line feed, to signal the end of a line of text, but other characters are also used for this function (see newline); others use it only for a paragraph break (a hard return). Some standards which introduce their own representations for line and paragraph control (for example HTML) and many programming languages treat carriage return and line feed as whitespace.

In ASCII and Unicode, the carriage return is defined as 13 (or hexadecimal 0D); it may also be seen as control+M or ^M. In the C programming language, and many other languages influenced by it, \r denotes this character.[1]

See also

References

  1. ^ Eric S. Roberts. The Art and Science of C. Addison-Wesley, 1995. p311.

Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Carriage Return —   [Abk. CR, dt. »Wagenrücklauf«] das oder der, ürsprünglich von der Schreibmaschine übernommene Bezeichnung, bei der es einen Wagen gibt, der beim Erreichen des Zeilenendes durch Betätigen eines Hebels (bei elektrischen Ausführungen: einer Taste) …   Universal-Lexikon

  • carriage return — UK / US noun [countable] Word forms carriage return : singular carriage return plural carriage returns computing a character that tells a computer to move the cursor to the beginning of the line …   English dictionary

  • Carriage Return — <CR> Der Wagenrücklauf (englisch carriage return deutsch veraltet auch WR) ist auf Ausgabegeräten für Text die Anweisung, den Anfang der Zeile anzusteuern. Inhaltsverzeichnis 1 Schreibmaschinen 2 Fernschreiber 3 Computer …   Deutsch Wikipedia

  • Carriage return — <CR> Der Wagenrücklauf (englisch carriage return deutsch veraltet auch WR) ist auf Ausgabegeräten für Text die Anweisung, den Anfang der Zeile anzusteuern. Inhaltsverzeichnis 1 Schreibmaschinen 2 Fernschreiber 3 Computer …   Deutsch Wikipedia

  • carriage return — grįžimo į eilutės pradžią ženklas statusas T sritis informatika apibrėžtis Valdymo ženklas. Kodas: 13 (ASCII, dešimtainis), 0D (ASCII, šešioliktainis). Koduotėse žymimas CR (angl. carriage return). Kartu su ↑eilutės patraukimo ženklu tekstiniuose …   Enciklopedinis kompiuterijos žodynas

  • carriage return — /ˈkærɪdʒ rəˌtɜn/ (say karij ruh.tern) noun 1. (on a typewriter) a key or lever which causes the next character typed to be positioned at the left margin and down a line. 2. (on a computer) a key or character which performs a similar function, as… …  

  • Carriage return — Retour chariot Le retour chariot désigne originellement le mécanisme physique permettant au chariot d une machine à écrire de revenir en butée à gauche (soit, du point de vue du rédacteur, de revenir au début de la ligne). Par extension, le terme …   Wikipédia en Français

  • carriage return — atgalinė vežimėlio eiga statusas T sritis automatika atitikmenys: angl. carriage return vok. Wagenrücklauf, m rus. обратный ход каретки, m pranc. retour de chariot, m …   Automatikos terminų žodynas

  • carriage return — grįžimas į eilutės pradžią statusas T sritis informatika apibrėžtis Veiksmas rašomosios mašinėlės vežimėliui grąžinti į eilutės pradžią, kompiuteriuose virtęs ↑grįžimo į eilutės pradžią ženklu. atitikmenys: angl. carriage return ryšiai: dar… …   Enciklopedinis kompiuterijos žodynas

  • Carriage Return Line Feed — En informatique, CRLF (ou CR+LF), est une séquence de deux octets qui indique une fin de la ligne (et surtout une nouvelle ligne) dans un texte. Le sigle CRLF provient de la juxtaposition du sigle de Carriage Return (retour chariot) et de Line… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”