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 character
(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!
==Definition== An escape character may not have its own meaning, so all escape sequences are of two or more characters. Escape characters are part of the [[formal syntax|syntax]] for many programming languages, data formats, and communication protocols. For a given [[alphabet (computer science)|alphabet]] an escape character's purpose is to start character sequences (so named [[escape sequence]]s), which have to be interpreted differently from the same characters occurring without the prefixed escape character. The functions of escape sequences include: * To encode a syntactic entity, such as device commands or special data, which cannot be directly represented by the alphabet. * To represent characters, referred to as ''character quoting'', which cannot be typed in the current context, or would have an undesired interpretation. In this case, an escape sequence is a [[digraph (computing)|digraph]] consisting of an escape character itself and a "quoted" character. ===Control character=== Generally, an escape character is not a particular case of (device) [[control character]]s, nor vice versa. If we define control characters as non-[[graphic character|graphic]], or as having a special meaning for an output device (e.g. [[computer printer|printer]] or [[text terminal]]) then any escape character for this device is a control one. But escape characters used in programming (such as the [[backslash]], "\") are graphic, hence are not control characters. Conversely most (but not all) of the [[ASCII]] "control characters" have some control function in isolation, therefore they are not escape characters. In many programming languages, an escape character also forms some escape sequences which are referred to as control characters. For example, [[Line break (computing)|line break]] has an escape sequence of {{code|\n}}.
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)