Hi all, I'm reading about escape sequences in C and it's confusing me. I always thought of an "escape" being just that, the \n "escapes" to the next line.
Now I'm reading about them with regards to character constants. For example, a constant representing the escape character would be written '\33 (or '\x1b').
I don't understand the above claim at all. Since it says "a constant representing the escape character" I'm assuming that '\33 and '\x1b' are the constants it's using as an example, and is the book saying that they represent the escape character.......are they referring to \n ??
Since \n "escapes" to a new line, why do we need to confuse everything and use a numerical constant to represent an escape?? I don't get it at all? If I want to escape to a new line, why not just always use \n? Why would I ever want to write my escape character as '\33? Is it cooler to do? What's the point in this?
Now I'm reading about them with regards to character constants. For example, a constant representing the escape character would be written '\33 (or '\x1b').
I don't understand the above claim at all. Since it says "a constant representing the escape character" I'm assuming that '\33 and '\x1b' are the constants it's using as an example, and is the book saying that they represent the escape character.......are they referring to \n ??
Since \n "escapes" to a new line, why do we need to confuse everything and use a numerical constant to represent an escape?? I don't get it at all? If I want to escape to a new line, why not just always use \n? Why would I ever want to write my escape character as '\33? Is it cooler to do? What's the point in this?