Keith Devens .com |
Tuesday, October 14, 2008 | ![]() |
| I was always told, that if I ain't gonna be part of the greatest, I gotta be the greatest... – Busta Rhymes | ||
|
| ← An Eye for Annai (animated short) | Brad Cox's Objective-C Book → |

DJ Hannibal wrote:
Anonymous wrote:
My copy of C# from VS2005:
Program.cs(11,31): error CS1009: Unrecognized escape sequence
No runtime behavior since the build fails
Davd wrote:
Wow, I'm really upset at Python. I love Python, but clearly an escaped character that doesn't need to be escaped is just a regular character. You should be able to escape every character in a string and just get that string back.
What is "escaping" if not "take the next character literally".
Consider it this way... how to you get a "" in the result string. Shouldn't you only get a "" from "\". The first "" in any situation is a control character and should get eaten.
Wow... this is a very crushing revelation. As my regexps get more complex, I'm going to have to watch out for this.
Keith (http://keithdevens.com/) wrote:
What is "escaping" if not "take the next character literally".
It doesn't mean that at all. "\n" means "newline", "\b" means "Bell", "\uEF29" means Unicode character... and so on.
You should be able to escape every character in a string and just get that string back.
Huh? No, you'd wind up with a string full of newlines and tabs and such.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.676s.
(Used 8 db queries)

C# exhibits the same behaviour as C/C++, which you can generally count on. Java should throw a compiler error, but who knows with that obtuse, daft, and inane language.