|Integer ASCII code:||13|
|Binary code:||0000 1101|
|C/C++ notation:||\r or '\r'|
Unicode symbol: ␍, int code: 9229 (html ␍) hex code: 240D (html ␍)
Initially carriage return was used in order to move the cursor to column zero while staying on the same line. It is used in classic Mac OS (pre-Mac OS X), as well as in earlier systems such as the Apple II and Commodore 64, in order to mark end-of-line. In DOS, Windows, and different network standards, it is used foregoing LF, being a part of the end-of-line mark. This character can be sent using a Enter or Return key on a keyboard. Apart from this, it may be converted to a different end-of-line sequence by a terminal program.
Carriage return is sometimes called cartridge return. The most popular variant of its name is a laconic abbreviation CR. <CR> or return, is a control character or mechanism used in order to reset a position of the device to the beginning of a line of text. The carriage return notion is closely associated with the line feed and newline concepts. Of course, it can be considered separately in its own.
Initially, the notion "carriage return" was closely connected to a mechanism or lever placed on a typewriter. Let's see the examples. Imagine machines where the fixation of the type element was essential and the paper was held in a moving carriage. In this case the lever was used only after typing a line of text in order to make the carriage to return to the far right. This way the type element would be leveled to the left side of the paper. The lever usually had one more function of feeding the paper in order to move forward to the next line.
Lots of electric typewriters, for example IBM Electric or Underwood Electric made a separate key for carriage return on the keyboard instead of having a lever. The usual name of such key was "carriage return", "return", or "power return". In the Selectric type typewriters, the type element moved when typing and the paper was fixed, so the key returned the type element back to the far left. "Carrier return" term was used for this function, but not that often.
In order to improve the keyboard for non-English-speakers and make it more convenient, the symbol ↵ (U+21B5, HTML entity &crarr ;) was introduced to cooperate the combined carriage return and line feed action.
The carriage return is one of the control characters in ASCII code, Unicode, EBCDIC, and lots of other codes, if we're talking about computers. It controls a printer, or any other output system, for example the display of a system console. It controls the move of the cursor position to the first position on the same line. It was mainly used in pair with line feed (LF), a move to the next line. Being united, together they start a new line. CRLF - this is how this united sequence can be called.
The carriage return and line feed functions were divided. There are main reasons for that:
* Carriage return itself has proved its ability to overprint the line with new text. This option could be used in order to create bold or accented characters, underscores, struck-out text, and some composite symbols.
* The first mechanical printers worked really slowly, in order to return the carriage in time it took to handle one character. For this purpose, the time that was spent on sending the line feed was not wasted (frequently several more characters needed to be sent in order to make sure the carriage return had taken place before sending a printing character). This is the reason why the carriage return was always sent first.
* In order to save print and transmission time without the need for additional circuitry or mechanical complexity to "filter out" false additional CR signals, it was also possible to enter several line feed operations into the time required for a single carriage return—for example for printing text, headers/footers or title pages, which have double space.
In 1901, Baudot code provided individual carriage return and line feed characters.
Lots of computer programs use the carriage return character. It can be used alone or with a line feed, in order to signal the end of a text line. However, it's not the only character with such a function. The other characters are used for this function as well (see newline); some use it only for a paragraph break (a "hard return"). Some standards which have their own representations for line and paragraph control (for example HTML), as well as providing many programming languages, consider carriage return and line feed to be whitespace.
The carriage return is nominated as 13 (or hexadecimal 0D) In ASCII and Unicode; it may be figured as control+M or ^M as well. The carriage return is designated by in the C programming language, and lots other languages, that were somehow influenced by it.
|input value||base||type||output hash|