• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ASCII code for pc return
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ASCII code for pc return


  • Subject: Re: ASCII code for pc return
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 22 Apr 2005 17:56:53 -0400

On 4/22/05, Christopher Biagini <email@hidden> wrote:
> Don't they use some wretched CRLF system? One character isn't good
> enough.


It makes a certain amount of sense, and is consistent with the original definitions of CR and LF when the code set that would one day become ASCII was used for sending telegrams: CR returns the carriage to the far right (moves the cursor to the far left), while LF rolls the platen up one stop (moves the cursor down one line).  So CR by itself will let you go back and write over the same line again, while LF by itself is a cursor down that leaves you in the same horizontal position.

Most  OSes with ASCII-based character sets opted to use a single character to signify "end of line", which would get translated to the CRLF sequence needed to actually display text on a teletype.  This was done to save space, which was after all at a premium on machines with a few K of RAM and floppy disks that held only around 150K total.  Most of these OSes adopted CR by itself as the end-of-line sentinel, but UNIX went the other way and adopted LF by itself.  This fit in with the by-now-familiar way text editors and word processors work: you can't cursor down into text you haven't composed yet.  Given that restriction, an LF without a CR was meaningless, while a CR without an LF (going back to the start of the line to overwrite what was there) still made sense.  So CR kept its original semantics while LF got treated as if it always had a CR prepended to it.

So the Mac used CR and UNIX used LF and then they begat OS X, which as far as I can tell uses LFs underneath everything but makes them like like CRs in the Aqua apps.

--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ASCII code for pc return
      • From: Bill Briggs <email@hidden>
References: 
 >Re: ASCII code for pc return (From: Gnarlodious <email@hidden>)
 >Re: ASCII code for pc return (From: Christopher Biagini <email@hidden>)

  • Prev by Date: Re: Folder Actions: Use non-scripts?
  • Next by Date: Re: ASCII code for pc return
  • Previous by thread: Re: ASCII code for pc return
  • Next by thread: Re: ASCII code for pc return
  • Index(es):
    • Date
    • Thread