shebang strange thing...

Ben Finney bignose-hates-spam at and-zip-does-too.com.au
Thu Jun 26 19:43:23 EDT 2003


On 26 Jun 2003 12:25:55 -0700, - wrote:
> I think the terminology is not taken from typewriters, but from some
> old printers where you needed both characters to start a new line.
> 
> CR moved the print head to the beginning of the line

CR stands for "carriage return".  If you're talking about a print head
moving across the paper, you're no longer talking about a carriage
"returning", so the terminology obviously didn't come from electric
printers.

Carriage Return is a direct reference to the paper carriage on a manual
typewriter.  These predate electric printing machines, and thus the
terminology was borrowed when teletypes needed control codes to control
their print head.

On such typewriters, the "line feed" function was also separate; once
the carriage was returned to the start of the line, one could cause
the paper to feed up a line at a time to introduce more vertical space;
this didn't affect the position of the paper carriage, so was
conceptually a separate operation.

So, it was teletypes that needlessly preserved the CR and LF as separate
control operations, due to the typewriter-based thinking of their
designers.  If they'd been combined into the one operation, we would
have all the same functionality but none of the confusion over line
ending controls.

-- 
 \        "I installed a skylight in my apartment. The people who live |
  `\                          above me are furious!"  -- Steven Wright |
_o__)                                                                  |
http://bignose.squidly.org/ 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B




More information about the Python-list mailing list