Summary
In computer science, an escape sequence is a combination of characters that has a meaning other than the literal characters contained therein; it is marked by one or more preceding (and possibly terminating) characters. In C and many derivative programming languages, a string escape sequence is a series of two or more characters, starting with a backslash . Note that in C a backslash immediately followed by a newline does not constitute an escape sequence, but splices physical source lines into logical ones in the second translation phase, whereas string escape sequences are converted in the fifth translation phase. To represent the backslash character itself, \ can be used, whereby the first backslash indicates an escape and the second specifies that a backslash is being escaped. A character may be escaped in multiple different ways. Assuming ASCII encoding, the escape sequences \x5c (hexadecimal), \, \134 (octal) and \x5C all encode the same character: the backslash . For devices that respond to ANSI escape sequences, the combination of three or more characters beginning with the ASCII "escape" character (decimal character code 27) followed by the left-bracket character [ (decimal character code 91) defines an escape sequence. When directed this series of characters is used to change the state of computers and their attached peripheral devices, rather than to be displayed or printed as regular data bytes would be, these are also known as control sequences, reflecting their use in device control, beginning with the Control Sequence Initiator - originally the "escape character" ASCII code - character 27 (decimal) - often written "Esc" on keycaps. With the introduction of ANSI terminals most escape sequences began with the two characters "ESC" then "[" or a specially-allocated CSI character with a code 155 (decimal). Not all control sequences used an escape character; for example: modem control sequences used by AT/Hayes-compatible modems Data General terminal control sequences, but they often were still called escape sequences, and the very common use of "escaping" special characters in programming languages and command-line parameters today often use the "backslash" character to begin the sequence.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.