Why were so many End of line formats created for different operating system. Couldn't it have been simpler to adapt to a predetermined standard to at least end the line in same fashion.
Well, first off -- do you understand what those terms mean? Why they're called that, I mean? Probably you do, but just in case, I've detailed them below.<p><pre><code> Carriage return: return the carriage head to the margin regardless of what its current horizontal position is.
Line feed: advance the position of the paper by one line.
</code></pre>
These are teletype metacharacters that control the behavior of the "display" for historical computers. As a result of being one of the early computer standards, text file encodings and terminals have inherited these qualities.<p>What should a computer terminal/terminal emulator do when it encounters these archaic control characters? Well, the carriage return could move the cursor to the beginning of this current line, ready to over-write any text on this line. And the line feed could move the position of the cursor down one vertical line, leaving the cursor at this same position. In order to move to the beginning of the next line, as is customary, you would need to perform both of these steps.<p>Now imagine you're a computer OS vendor in the early days of computers and you say to yourself: these metacharacters are a silly legacy of the teletype -- who would want to advance the linefeed without a carriage return? Let's just make it implicit when you do a linefeed that we will mark the position of the cursor at the beginning of the next line. And you can do that if you offer an out-of-band channel ("termios", e.g.) to move the cursor around the terminal independent of the print stream. But imagine you're another computer OS vendor and you don't have that feature and if you get it later you have a bunch of customers who wrote their software contingent on the explicit carriage-return/linefeed behavior. Now, you might feel bound by compatibility to preserve that behavior. Both OS vendors use what they call ASCII-encoded text files, but the metacharacters now mean something slightly different.<p>EDIT: it sounds like I wasn't <i>too</i> far off. But the canonical reference seems to be the wikipedia entry cited in another post.