After all, in theory, first, a new line feed occurs, and only then a carriage return https://youtu.be/oxN1C2QQUIE

PS MacOS and linux users: do you really only have one LF character?

  • one
    Yes, really one - andreymal
  • one
    One. There is more a question with Microsoft. This is their decision about the two characters. - Amareth
  • 2
    In mac'ov just one CR, if not changed. Under Unix, one LF. - CR + LF - Small
  • five
    @ Small changed, CR was only in Mac OS 9, and already with OS X it became LF, like in all Unixes - andreymal
  • one
    And we do not have the font Arial and Times New Roman. How to live now? Can you live with this knowledge? - bukkojot

1 answer 1

Wikipedia explains it this way: when printing on a teletype, the carriage return lasted longer than one character was printed. Therefore, if you first translate the line, and then return the carriage and print further, the first character was printed somewhere in the middle of the line.

The order CR, LF was chosen to give the carriage a small head start. Even it could not be enough, and then after some empty sequence was sent.

only one LF character

It began to be used in OS Multics, where the printer carriage transfer (and, apparently, the wait until the end of the translation) was carried out by its driver. CR without a new line could be used for different decorative effects. From Multics LF moved to Unix, and from there to the rest of the OS.

  • one
    @sanmai thanks! - Nick Volynkin