Jump to content

\r\n


astralaaron

Recommended Posts

Technically a carriage return resets the output caret to the leftmost margin. A line feed (which is \n) brings the caret down one line. In most modern systems, however, any of them seperate or in combination will do both at once. Different systems use different characters by default (DOS = \r\n, UNIX = \n, MAC = \r), but can recognise all.

Link to comment
Share on other sites

And if you are interested in history, in the olden days there used to be machines called typewriters :) with moving parts. The carriage was the bit with the roller where you put the paper, and it moved one space to the left each time you typed a character. At the end of the line you heaved on a lever to move the carriage all the way to the right, to return it to the start of the next line. :)

Link to comment
Share on other sites

Actually, the typewriter thing is no joke if you just change the word to teletype printer, which is where the first 128 characters come from. Didn't you ever wonder why one of them is called "bell"?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...