Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Escape sequence
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== * In [[C (programming language)|C]] and many derivative programming languages, a string escape sequence is a series of two or more characters, [[Escape sequences in C|starting with a backslash <code>\</code>]].<ref>{{cite web |quote=Character combinations consisting of a backslash <code>\</code> followed by a letter or by a combination of digits are called ''escape sequences''. |title=Escape Sequences |date=3 August 2021 |url=https://msdn.microsoft.com/en-us/library/h21280bw.aspx}}</ref> ** Note that in C a backslash immediately followed by a newline does <em>not</em> 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.<ref>{{cite web |url=http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1570.pdf#page=29 |title=ISO/IEC 9899:201x Committee Draft N1570 |language=English |quote=5.1.1.2 Translation phases, 2.: Each instance of a backslash character (<code>\</code>) immediately followed by a new-line character is deleted, splicing physical source lines to form logical source lines. [...]}}</ref> ** To represent the backslash character itself, <code>\\</code> can be used, whereby the first backslash indicates an escape and the second specifies that a backslash is being escaped.<ref>{{cite web |url=https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.cbclx01/escape.htm |title=Escape sequences|website=[[IBM]] }}</ref> ** A character may be escaped in multiple different ways. Assuming ASCII encoding, the escape sequences <code>\x5c</code> ([[hexadecimal]]), <code>\\</code>, and <code>\134</code> ([[octal]]) all encode the same character: the backslash <code>\</code>. * For devices that respond to [[ANSI escape code|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 <code>[</code> (decimal character code 91) defines an escape sequence.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)