[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] When is \r really \n in MacPerl!?



According to Mark F. Murphy:
> 
> Ord \r: 10
> Ord \n: 13
> 
> In MacPerl 5.1.5r4.
> 
> This is obviously a little backwards.

I can see why this does this.  Or rather, I can see why \n
returns the 13.  But shouldn't \r return 13 too?

To Mark: \n returns 13 because \n represents the new line
character(s) and is thus 10 on Unix, 10, 13 on the IBM, and
just 13 on the Mac.  Control-J (ie: 10) is a line feed
character.  Which is different from the new line
character.  New line being defined (I think) as whatever
character combination is needed in order to move down one
line and back to position 1 on a typewriter.  While line
feed simply would make the typewriter eject the page one
line.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch