digitalmars.D - \ OctalDigit etc.
- Moritz Warning (14/14) Mar 15 2008 This was probably discussed before.
- Walter Bright (2/2) Mar 19 2008 The way the octal escape sequences work is pretty standard practice. To
- Sean Kelly (4/6) Mar 19 2008 The format of octal literals is one of the more harebrained ideas we've ...
- bearophile (4/6) Mar 20 2008 Just fixed in Python 3.0 ;-) Among many other things. But I too can see ...
- Jarrett Billingsley (3/5) Mar 20 2008 People use them?
- BCS (7/17) Mar 20 2008 People is simply plural. Therefor, if there are 2 people who use them,
This was probably discussed before. But I run into a problem when I was checking for missing characters in a long string sequence since some application kept telling me that it was invalid. The point was that \012 is not '\0' '1' '2' but one char '\012'. other representations with hexadecimal numbers have an alphabetical char to indicate smth. special might follow (\xaa). In my case thinking of \0 being the same as single char and in a string was wrong. This is inconsistent and I think many could get wrong as I did. I don't have much hope to get a convenient solution as for hexadecimal representations. But I thought I just post this for others who stumble over the same stone. :/
Mar 15 2008
The way the octal escape sequences work is pretty standard practice. To change it would be to confuse the other half of people who use it :-(
Mar 19 2008
== Quote from Walter Bright (newshound1 digitalmars.com)'s articleThe way the octal escape sequences work is pretty standard practice. To change it would be to confuse the other half of people who use it :-(The format of octal literals is one of the more harebrained ideas we've inherited from C. I'd love to require an "0o" prefix or something of the sort, but it would cause unnecessary trouble for ported C code. Ah well. Sean
Mar 19 2008
Sean Kelly:The format of octal literals is one of the more harebrained ideas we've inherited from C. I'd love to require an "0o" prefix or something of the sort, but it would cause unnecessary trouble for ported C code. Ah well.Just fixed in Python 3.0 ;-) Among many other things. But I too can see the situation is different: you usually don't port much code from C to Python. Bye, bearophile
Mar 20 2008
"Walter Bright" <newshound1 digitalmars.com> wrote in message news:frs9ov$2258$1 digitalmars.com...The way the octal escape sequences work is pretty standard practice. To change it would be to confuse the other half of people who use it :-(People use them?
Mar 20 2008
Jarrett Billingsley wrote:"Walter Bright" <newshound1 digitalmars.com> wrote in message news:frs9ov$2258$1 digitalmars.com...People is simply plural. Therefor, if there are 2 people who use them, then the statement is correct (but not particularly useful). As to if /enough/ people use them to be worth anything... Also, I expect you (and most anyone) use them regularly because \0 is actual a 1 char octal escape sequence. That still has little bearing on the topic though.The way the octal escape sequences work is pretty standard practice. To change it would be to confuse the other half of people who use it :-(People use them?
Mar 20 2008