develooper Front page | perl.perl6.language | Postings from February 2005

Re: Octals

Thread Previous | Thread Next
From:
Mark J. Reed
Date:
February 22, 2005 13:23
Subject:
Re: Octals
Message ID:
20050222212303.GA3339@top.turner.com
On 2005-02-22 at 15:47:08, Larry Wall wrote:
>    Maybe \x is short for \0x and that also gives us \0o, \0d and \0b,
>    plus any other radix we come up with, assuming we decide it isn't
>    overly ambiguous with bare \0.

Works for me.  So when you really do want a \0 in the middle of a string
followed by a lowercase letter, how do you indicate that?  Something
like \0b0b  for a NUL followed by a lowercase 'b'?  Or maybe, despite
the "no \nnn" rule, we could allow \0 to be followed by any number of 
0s, which are ignored but prevent a following letter from being
interpreted as a radix key.  After all, zero is zero in any base
(or at least any base it makes sense to use for code points).  So 
to get a NUL followed by a 'b', you could use:

1. \00b (or \000b, or \000000000000000000b, etc)
2. \0b0b, \0d0b, \0o0b, \0x[0]b, etc
3. (maybe) \0b as long as the character after the b, if any, isn't a 0 or 1

?

-- 
Mark REED                    | CNN Internet Technology
1 CNN Center Rm SW0831G      | mark.reed@cnn.com
Atlanta, GA 30348      USA   | +1 404 827 4754

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About