windows - Why does carriage return come before new line -
there lots of questions asking correct order of carriage return , new line characters on windows (it's \r\n
) have not found real explanation why case.
\n
new line character, , \r
carriage return. so, if have \r
first, returns cursor beginning of current line - , \n
afterwards, wouldn't logically insert \n
@ beginning of current line , move current line down 1 instead of creating line after?
i mean understand when writing these file doesn't matter, when parsing/reading , outputting text, seems backwards me.
the order homage typewriter days.
early mechanical printers slow return carriage in time took process 1 character. therefore time spent sending line feed not wasted (often several more characters had sent ensure carriage return had happened before sending printing character). why carriage return sent first.
Comments
Post a Comment