Re: What should /\08/ match and do?

[email protected] (Abigail)
Newsgroups perl.perl5.porters
Message-ID <20100608161550.GA2475@almanda>
On Tue, Jun 08, 2010 at 10:05:23AM -0600, karl williamson wrote:
>>> Additional warning message changes
>>>   \08 \009 will generate a new message instead of
>>>   the existing wrong "Illegal octal digit ignored".
>>>   I'm thinking: "Too few digits in octal character
>>>   constant; assuming you meant '\\%04d'".
>>
>> Ah, that probably answers my question above. But too few digits? If one
>> changes the 8 and the 9 to X and Y, it won't complain about the number  
>> of digits.
>
> Wherever currently the wrong "Illegal octal digit ignored" message is  
> output and no other places, I was planning to change that to the new  
> message, whatever the wording.  That would apply to \18 in all the  
> contexts.  How about '"\18" resolved to "\0018"'?  (or "\18" resolved to  
> "\o{1}8"').  That's not adding a warning to unwarned code, since they  
> are already getting a warning (which happens to be a lie).


I fully agree a warning is justified. I also agree the current warning
is wrong. The wording '"\18" resolved to "\0018"' isn't incorrect, but
requires realizing that octal escapes are limited to 3 octals; I like
'"\18" resolved to "\o{1}8"' much more.


Abigail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.