View Single Post
Old Apr 26th, 2005, 3:25 PM   #2
Eggbert
Professional Programmer
 
Eggbert's Avatar
 
Join Date: Nov 2004
Posts: 250
Rep Power: 4 Eggbert is on a distinguished road
An escape sequence is simply a character literal. Single quotes make a character literal stand-alone, and double quotes make a character part of a string literal.

>cuz I always document my programs
Documenting well known language features serves no purpose in production code. For example, '\t' is well known to be an escape character representing a tab. No comments are needed to explain that. On the other hand, something like '\003' would need explanation. It's a character with the value 3, but what does the character represent in this situation? That is what you need to document, not how it works, but what it means in the application.
Eggbert is offline   Reply With Quote