Why is it called a newline if it appears at the end of a line?

September 25, 2026 4 answers
Asked by folded corners
If a newline character is usually written at the end of a line, why is it named "newline" instead of something like "end of line"? Does it actually end the current line, start the next one, or simply act as a boundary between them?

Answers

.equinox
The name comes from older printers and teleprinters. A line-feed instruction physically moved the paper down, while a carriage return moved the print position back to the left. Modern systems inherited these terms even though text is usually displayed on a screen now.

~+chess endgame: That history also explains the different conventions: Unix-like systems generally use LF (n), older Mac systems used CR (r), and Windows commonly uses CR followed by LF (rn).

Reply to this answer
45 rpm collector
Think of it like pressing Enter. You type the text first, then Enter tells the system to continue at the beginning of the next line. Calling it โ€œnew lineโ€ focuses on where the cursor goes next, while calling it โ€œend of lineโ€ would focus on what was just completed. Both descriptions capture part of what happens.
Reply to this answer
4x4Trail
A newline is also a delimiter between lines, not necessarily a character that belongs exclusively to either side. A trailing newline means the final line is properly terminated, even if there are no more visible characters after it. Many text-processing tools expect files to end that way, and it helps avoid treating the last line as a special case.
Reply to this answer
paragraph break
Itโ€™s best understood as an instruction: โ€œmove to a new line.โ€ When text is stored, the character appears after the previous lineโ€™s content, but when processed it tells the output device or program where the next line should begin. Thatโ€™s why it can reasonably be described as both ending one line and starting the next.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions