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

Re: Re[2]: [MacPerl] What am I missing?



At 15:16 96-07-30, PVHP@LNS62.LNS.CORNELL.EDU wrote:

>Not that this is not excellent advice (I think it is) but I am curious: is
>there some reason not to use hexadecimal or decimal sets? Would there be
>anything wrong with:

No -- I really meant "if you mean a specific bit pattern, use a bit
pattern" (as opposed to a meta character (which is what \n and cousins
are).

>>Remember, "\n" does NOT mean ASCII CR!!!!!
>
>OK I remember. I am still curious though.

It's a bit pendantic, so I was trying to avoid it.  For the real
details, see any indepth book on C and code portability (such as the
Tartan Labs books).  Perl inherits it's notion of \n from C.

In brief, "\n" is defined by C to express the concept of newline
"newline".  Nothing else.  It may, or may not, have a given bit pattern
that's the same as the bit pattern the OS's file system uses to denote
the end of a text line.  (Some OS's don't have such a bit pattern.)

--
Hal Wine <hal@dtor.com>