Re: Linefeeds

[prev] [thread] [next] [lurker] [Date index for 2005/06/27]

From: Peter da Silva
Subject: Re: Linefeeds
Date: 12:01 on 27 Jun 2005
On Jun 27, 2005, at 5:04 AM, Martin Ebourne wrote:
> Of course, if Acorn had used \n for linebreaks instead of \r then the 
> code above would trivially produce \r\n and everything would have 
> matched up with both unix & dos so much better.

Not to mention actually following ASCII which specified two possible 
encodings for a new line, either "linefeed-CarriageReturn" or 
"newline", where "linefeed" and "newline" were alternate names for the 
same position (0x0A, 0/10). Using "<CR>" for a newline breaks the 
straightforward translation of FORTRAN carriage control:

If the first character is space, replace with linefeed.
If the first character is plus, delete it.
If the first character is 0, replace with linefeed-linefeed.
If the first character is 1, replace with formfeed.
Print the line followed by a carriage return.

This produces the correct result in either case. Using carriage return 
for newline breaks FORTRAN, and in 1963 that was a big no-no.

Generated at 00:00 on 28 Jun 2005 by mariachi 0.52