What Brian says below is most of the story about CR and LF, but there's some additional twist. The distinction between CR and LF isn't used on modern systems, but it's still present as a difference between Operating Systems.
toggle quoted message
Show quoted text
Windows usually uses a CR-LF sequence where Unix/Linux uses only LF. Originally, the Mac used CR only as far as I remember, but switched to LF. Various Internet standards require CR-LF, others are more lenient and work with the various combinations.
Advanced plaintext editors and similar software can handle all conventions, and have functionality to detect, maintain, or change the convention. But some plaintext editors, in particular Notepad on Windows, don't. So if you open a file from Linux in Notepad, it will look as if it doesn't have any line breaks.
On 2021-12-16 06:33, Brian Vogel via groups.io wrote:
On Wed, Dec 15, 2021 at 02:06 PM, Sarah k Alawami wrote:
I was taught that return and a new line are not the same thing.
That both is, and is not, true based upon the context. I am probably one of "the oldsters" here, just a hair shy of 60, and started in computing when punchcards were still in use as were tractor feed printers.
And most of the differences came into play when talking about a tractor feed printer.
There was the carriage return, usually referred to with CR, which did just that: Move the print head (carriage) back to the left margin of the current line without feeding the paper.
There was the line feed, usually referred to with LF, which did just that: Feed the paper without moving the print head position.
There was the CR-LF combo, what we now think of and get, in practice, if we hit the Enter or Return key (and they are labeled as both, it depends on the keyboard). There is, of course, no paper involved, but conceptually you are returning the carriage to its leftmost position and feeding the virtual paper up by a single line (or however your line spacing is set). In writing systems that read right to left, substitute right for left.
There is really no point in trying to separate out Return or Enter in any modern computing context.
Brian - Windows 10, 64-Bit, Version 21H1, Build 19043
*Science has become just another voice in the room; it has lost its platform. Now, you simply declare your own truth.*
~ Dr. Paul A. Offit, in New York Times article, How Anti-Vaccine Sentiment Took Hold in the United States ( https://www.nytimes.com/2019/09/23/health/anti-vaccination-movement-us.html ) , September 23, 2019