Share on Facebook Share on Twitter Email
Answers.com

Escape character

 
Sci-Tech Dictionary: escape character
(ə′skāp ′kar·ik·tər)

(computer science) A character used to indicate that the succeeding character or characters are expressed in a code different from the code currently in use.


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Wikipedia: Escape character
Top

In computing and telecommunication, an escape character is a single character designated to invoke an alternative interpretation on immediately subsequent characters in a character sequence. The term escape sequence refers to the escape character and the character or characters whose meaning is modified.

Contents

Examples

Programming languages

Many modern programming languages specify the doublequote character (") as a delimiter for a string literal. The backslash \ escape character provides two ways to include doublequotes inside a string literal, either by modifying the meaning of the doublequote character embedded in the string (\" becomes "), or by modifying the meaning of the three characters that are the hexadecimal value of a doublequote character (\x22 becomes ").

In Perl:

print "Nancy said "Hello World!" to the crowd.";

produces a syntax error, whereas:

print "Nancy said \"Hello World!\" to the crowd.";  ### example of \"

produces the intended output. Another alternative:

print "Nancy said \x22Hello World!\x22 to them.";  ### example of \x22

uses numeric escape-sequence of hexadecimal "x22" for a quotemark.

C (programming language), C++, and Java (programming language) all allow exactly the same two backslash escape styles, while quoted-printable uses a slightly different numeric escape sequence.

Some programming languages also provide other ways to prevent this type of error, without requiring an escape character (see e.g. delimiter collision).

In the Bourne shell

In sh, the * character is a wildcard character expanded via globbing. Without a preceding escape character, it will expand to the names of all files in the working directory that don't start with a period if and only if there are such files, otherwise * remains unexpanded. So to refer to a file literally called "*", the shell must be told not to interpret it in this way, by preceding it with a backslash ("\"). This modifies the interpretation of the asterisk ("*"). Compare:

 
rm *    # delete all files in the current directory
 
rm \*   # delete the file named *

Categories

  • In alphabet coding schemes, a specially designated character, the occurrence of which in the data signifies that one or more of the characters to follow are from a different character code, i.e., have meanings other than normal.
  • In a text-control sequence of characters, a control character that indicates the beginning of the sequence and the end of any preceding text. This is for instance used to control text terminals and printers (see escape sequence).
  • In the ASCII character code, the character ESC with decimal code 27 and hexadecimal code 1B.

Early reference to this term is found in Bob Bemer's IBM technical publications.

The Escape key is usually found on standard PC keyboards. However it is commonly absent from keyboards for PDAs and other devices not designed primarily for ASCII communications, and not generally used as part of the common user interface for applications on the Windows operating system. The DEC VT220 series was one of the few popular keyboards that did not have a dedicated Esc key, instead using one of the keys above the main keypad.

See also

External links

PD-icon.svg This article incorporates public domain material from the General Services Administration document "Federal Standard 1037C".


Translations: Esc
Top

Dansk (Danish)
abbr. - escapetast

Français (French)
abbr. - (abrév = escape) (Comput) touche d'échappement

Deutsch (German)
abbr. - Wirtschafts- und Sozialausschuss

Ελληνική (Greek)
abbr. - (Η/Υ) το πλήκτρο διαφυγής Escape

Español (Spanish)
abbr. - tecla "Escape"

Svenska (Swedish)
abbr. - Escape (data), extended core storage (data), Economic and Social Council (of the UN), electronic structural correlator, European Space Conference

中文(简体)(Chinese (Simplified))
换码字符, 扩展字符

中文(繁體)(Chinese (Traditional))
abbr. - 換碼字元, 擴展字元

한국어 (Korean)
abbr. - Economic and Social Committee (경제사회 이사회)

עברית (Hebrew)
abbr. - ‮מקש היציאה מהמרקע הנוכחי (מחשב)‬


 
 

 

Copyrights:

Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Escape character" Read more
Translations. Copyright © 2007, WizCom Technologies Ltd. All rights reserved.  Read more