女人为什么会叫| 胃反酸吃什么食物好| 亭台楼阁是什么意思| 888是什么意思| 5D电影是什么效果| 海南的海是什么海| 什么是虚荣心| 小儿积食吃什么药| 湿气重的人喝四物汤会有什么| 女孩学什么专业好| 小孩心肌炎有什么症状| 精神紊乱吃什么药| 风寒感冒吃什么药效果好| 特需号是什么意思| 马的贵人是什么生肖| 血压正常心跳快是什么原因| 曹操属什么生肖| 记者学什么专业| 糖尿病筛查做什么检查| 政委是干什么的| 舌头起泡吃什么药| 什么空如洗| 夜未央什么意思| 乳腺增生是什么| 牙龈经常发炎是什么原因| 类风湿有什么特效药| phoebe是什么意思| 牙齿黑是什么原因| 什么是积| 脑子疼是什么原因| 舌炎是什么原因引起的怎样治疗| 牛蛙不能和什么一起吃| 来大姨妈吃什么水果好| 喉炎吃什么药最有效| 金鱼的尾巴像什么| 乳腺增生吃什么药最好| 峦读什么| 3月27号是什么星座| 壁虎吃什么| 八月一号是什么星座| 舌头发白有齿痕是什么原因| 查hpv挂什么科| 中耳炎吃什么药效果比较好| 海绵体供血不足吃什么药| 12月16是什么星座| 圆周率是什么意思| 血小板压积偏低是什么意思| 春秋是什么时期| 子宫内膜回声不均匀是什么意思| 君子兰用什么土最好| 对对子是什么意思| 为什么会宫缩| plg是什么意思| 难以入睡是什么原因引起的| 黄历修造是什么意思| rn是什么意思| 刚生完孩子可以吃什么水果| 益是什么意思| 271是什么意思| 浅棕色是什么颜色| 月月红是什么花| 嗓子有异物感堵得慌吃什么药| 啵啵是什么意思| 胳膊肘疼痛是什么原因| 桂圆什么时候上市| 雨露均沾什么意思| 剑兰什么时候开花| 玉的主要成分是什么| 膝盖疼痛挂什么科| 才子是什么意思| 为什么尽量抽混合型烟| 牙龈萎缩用什么牙膏好| 淋巴细胞高是什么意思| 心血管科是看什么病| 身体缺钾是什么原因造成的| 什么样的你| 外科主要看什么病| 三个又是什么字| 西地那非有什么副作用| 宋江的绰号是什么| 有什么作用| 为什么洗头发时会掉很多头发| 反流性食管炎吃什么药最有效| 李白属什么生肖的| 属牛的跟什么属相最配| 发痧吃什么药可以断根| 户籍所在地是指什么| 幽门螺旋杆菌是什么症状| 人为什么要工作| 歧视是什么意思| 牙痛用什么药止痛快| 梦见老人去世预示什么| 梦到生男孩有什么预兆| 三部曲是什么意思| 南是什么结构| 三七粉是治什么病的| 脾肾阳虚吃什么中成药| 英国全称是什么| 什么花适合送老师| 碳酸钠为什么显碱性| 什么最珍贵| 山洪是什么意思| 02年的马是什么命| 贪是什么意思| ricu病房是什么意思| 检查视力挂什么科| 血脂高吃什么油| 美育是什么意思| 豆腐炖什么好吃| 1月17号是什么星座| 为什么小孩子有白头发| island什么意思| 六月十二号是什么星座| 右手小指戴戒指什么意思| alpha什么意思| 富士山什么时候喷发| 吴亦凡什么学历| 吃什么能让头发变黑| 安居乐业是什么意思| 青津果的功效是什么| 前列腺特异性抗原是什么意思| 孩子发烧手脚冰凉是什么原因| 黄皮是什么| 肛门潮湿是什么情况| 什么是排卵期怎么计算| 为什么不可以| 胰腺癌晚期什么症状| 哆啦a梦的口袋叫什么| 45是什么生肖| 龙猫是什么动物| 辅警和协警有什么区别| 宫颈ecc是什么意思| 嫦娥奔月是什么节日| 排卵期是什么时候开始算| 蛋糕裙搭配什么上衣| 相得益彰意思是什么| 偏头痛不能吃什么食物| 西字里面加一横是什么字| 疱疹吃什么药可以根治| tct检查什么| rp是什么意思| 少字五行属什么| reald厅什么意思| 白食是什么意思| 火龙果有什么功效| 女性看乳房应该挂什么科| 肌肉萎缩看什么科| 怀孕吃鹅蛋有什么好处| 不修边幅是什么意思| 毛囊炎用什么洗发水| 汗毛长是什么原因| 尿道炎什么症状| 生育登记有什么用| 心软是什么意思| 胃火大吃什么药效果好| 补气补血吃什么好| 复刻是什么意思| 蕴是什么意思| 咽喉疼吃什么药| 三个白念什么| 测血糖挂号挂什么科| 刚怀孕需要注意什么| 拉肚子可以喝什么| 过敏性咳嗽吃什么药| 簸箕是什么东西| 苹果什么时候出新手机| 返酸水吃什么药| 卫衣是什么| 宝宝发烧手脚冰凉是什么原因| 金脸银脸代表什么人物| 2016年是什么命| 什么萌| 一百万存款算什么水平| 偶发性房性早搏是什么意思| 做梦梦见蛇是什么意思| 血压高的表现症状是什么| 温度计代表什么生肖| 火箭军是干什么的| 炒锅买什么材质的好| 什么是女人味| 肚脐眼连着什么器官| b型血rh阳性是什么意思| 33数字代表什么意思| 同房后出血是什么原因| 吐口水有血是什么原因| 先自度其足的度是什么意思| 莫西沙星片主治什么病| 左眼皮跳什么预兆| 荔枝不能跟什么一起吃| 贝五行属什么| 一月来两次月经是什么原因| ys是什么意思| 七点到九点是什么时辰| 夏至喝什么汤| 什么季节减肥效果最快最好| 抵抗力差吃什么可以增强抵抗力| 拆线去医院挂什么科| 左边是心脏右边是什么| 正品是什么意思| 凤雏是什么意思| 暗戳戳是什么意思| 西葫芦不能和什么一起吃| 肺炎不能吃什么| cinderella是什么意思| zhr是什么牌子的鞋| 左氧氟沙星治什么病| 双鱼配什么星座| 吃什么药头脑立刻清醒| 什么是地中海饮食| 夜尿次数多是什么原因| 米糊是什么| 癃闭是什么意思| 羊肉炖什么好吃又营养| 中邪是什么意思| 腿麻是什么病的前兆吗| 干细胞移植是什么意思| 细胞骨架是由什么构成| 宝宝胀气是什么原因引起的| 什么是手性碳原子| 椭圆形脸适合什么发型| 腿上无缘无故出现淤青是什么原因| 明天代表什么生肖| 砂舞是什么意思| esse是什么牌子的烟| 婊子是什么生肖| 他将是你的新郎是什么歌| 芒硝有什么作用| 带状疱疹吃什么药| 双喜临门是什么生肖| 生性多疑是什么意思| 肾素活性高是什么原因| 知是什么意思| 孕晚期脚肿是什么原因| 姑娘是什么意思| 冷落是什么意思| 取环前需要做什么检查| 什么食物化痰| 开理疗店需要什么证件| 伏藏是什么意思| 尿道结石有什么症状| nk细胞是什么| 经常说梦话是什么原因| 抽筋什么原因| 篮子房是什么意思| 1935年是什么生肖| gn是什么意思| 胶囊壳是什么原料做的| 藿香正气水什么味道| 吃什么能提高性功能| 为什么不能踩死蜈蚣| esrd医学上是什么意思| 警察为什么叫条子| 腹胀挂什么科| 贫血喝什么茶| 冚家铲是什么意思| 眼睛充血用什么眼药水好| 热天不出汗是什么原因| 糖醋鱼用什么鱼做好吃| adhd是什么意思| 吸氧机什么牌子好| 纾字五行属什么| 什么草地| 什么的爱| 化疗期间吃什么好| 百度Jump to content

按关元穴防痛经宫寒不孕 必知的人体4大强壮穴

From Wikipedia, the free encyclopedia
百度 中国是世界最大大豆进口国,也是美国农产品第二大进口国。

In computing, an escape sequence is a sequence of characters that has a special semantic meaning based on an established convention that specifies an escape character prefix in addition to the syntax of the rest of the text of a sequence.[1][2] A convention can define any particular character code as a sequence prefix. Some conventions use a normal, printable character such as backslash (\) or ampersand (&). Others use a non-printable (a.k.a. control) character such as ASCII escape.

Escape sequences date back at least to the 1874 Baudot code.[3][4][5]

Examples

[edit]

Data transmission

[edit]

A common use of an escape sequence is to remove control characters from a data stream so that it does not cause its control function by mistake. The control character is replaced with an escape character and one or more other subsequent characters. After escaping the normal context in which the control character would have caused an action, the sequence is replaced by the removed character.[6] To transmit the escape character itself, two copies are sent.[7]

Text literal

[edit]

An escape sequence is often used in character and string literals, to encode characters which are not printable or clash with the syntax of characters or strings. For example, control characters might not be allowed in a source file or may have undesirable side-effects if typed into a command.

In C and many derivative programming languages, a backslash (\) in a string literal marks the beginning of an escape sequence.[8][9] Common escape sequences include: carriage return \r, newline \n, tab \t. To account for the fact that using a printable character for escape causes that character to lose its normal meaning, a sequence of two backslash characters (\\) encodes a single backslash. An escape sequence can also specify a character by its code value. For example, the backslash can be encoded as either \x5c or \134 which specify the character code value as hexadecimal and octal, respectively.

A backslash immediately followed by a newline (which is necessarily outside of a string literal) does not mark an escape sequence. The C preprocessor joins the line with the subsequent line.[10]

Quoting escape

[edit]

When an escape character is needed within a string literal, there are two common strategies:

  • Doubled delimiter – For example, 'He didn''t do it.')[7]
  • Secondary escape sequence – For example, the command prompt command echo Cut^&Paste outputs "Cut&Paste" in by escaping the ampersand operator with a caret (^)[6]

In C and many related languages, the escape character is the backslash (\). The single quotation mark character can be coded as '\'' since ''' is not valid. As a string literal is delimited by double-quotes (") the content cannot contain a double-quote unless it is escaped ("\"") or via a sequence that specifies the code of the double-quote character (\x22).

In Perl or Python 2, the following is invalid syntax:

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

This can be fixed by inserted backslash to escape:

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

Alternatively, the following uses "\x" to indicate the subsequent two characters are hexadecimal digits; "22" being the hexadecimal ASCII value for double-quote.

print "Nancy said \x22Hello World!\x22 to the crowd."

C, C++, Java, and Ruby allow the same two backslash escape styles. PostScript and rich text format (RTF) also use backslash escapes. The quoted-printable encoding uses the equals sign as an escape character. URL and URI use percent-encoding to quote characters with a special meaning, as for non-ASCII characters.

ANSI escape sequences

[edit]

The VT52 terminal used simple digraph commands like escape-A. Without the escape character prefix, A simply meant the letter A, but as part of the escape sequence escape-A, it had a different meaning. The VT52 also supported parameters. It was not a straightforward control language encoded as substitution.

The later VT100 terminal implemented the more sophisticated ANSI escape sequences standard (now ECMA-48) for functions such as controlling cursor movement, character set, and display enhancements. The HP 2640 series had perhaps the most elaborate escape sequences for block and character modes, programming keys and their soft labels, graphics vectors, and even saving data to tape or disk files.

In Windows (and older DOS), a utility, ANSI.SYS,[11] can be used to enable ANSI escape sequence support. In DOS via $e in the PROMPT command), and in 16-bit Windows via a command window. In Unix and Unix-like systems, the ANSI escape sequences are generally supported by the shell. The rise of GUI applications has reduced the use of escape sequences, yet the ability to provide full-screen, text-based applications is still available.

[edit]

Control sequence

[edit]

A control sequence is a sequence of characters that changes the state of a computer peripheral instead of conveying the normal information that the characters represent. In an ANSI escape sequence, the escape sequence prefix, called control sequence introducer, can be either ASCII ESC (decimal 27) followed by [ or CSI (decimal 155). Notable systems that did not use an escape character for control sequences include:

  • The Hayes command set defines a control sequence, +++ that is modal; switching from command to online mode. To ensure that the sequence is interpreted as a control sequence instead of embedded in content, the sender stops communication for one second before and after sending +++. When the modem detects condition, it switches from normal mode (sending characters to the phone) to a command mode in which the data is interpreted a command. Sending the O command switches back to the normal mode.[12][13][14][15]
  • Data General terminal control sequences,[16][17][18] 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.

Escape sequences in communications are commonly used when a computer and a peripheral have only a single channel through which to send information back and forth (so escape sequences are an example of in-band signaling).[19][20] They were common when most dumb terminals used ASCII with 7 data bits for communication, and sometimes would be used to switch to a different character set for "foreign" or graphics characters that would otherwise been restricted by the 128 codes available in 7 data bits. Even relatively "dumb" terminals responded to some escape sequences, including the original mechanical Teletype printers (on which "glass Teletypes" or VDUs were based) responded to characters 27 and 31 to alternate between letters and figures modes.

Esc key

[edit]

Many computer keyboards have an Esc key (where Esc is short for escape) even though it is generally not used for entering an escape sequence. The vi text editor uses the key to exit from input mode.[21] Some application use the key to cancel an operation or navigate up a level of a nested context.[22]

See also

[edit]

References

[edit]
  1. ^ "Escape Sequence (General Concept)".
  2. ^ "Characters". The Java Tutorials.
  3. ^ "What is ASCII? The Economist explains". The Economist. 2025-08-06.
  4. ^ "Baudot and CCITT code". The Baudot code, invented in 1870 and patented in 1874 by J. Baudot is […]
  5. ^ "Guide to the use of Character Sets in Europe". elements C0 and C1 of control characters […] a 5-bit code patented by Jean-Maurice-Emile Baudot (1845-1903) in 1874
  6. ^ a b "The Windows NT Command Shell". 20 February 2014.
  7. ^ a b "Apostrophe Editing ('aaa') (FORTRAN 77 Language Reference)". Within the field, two consecutive apostrophes […]
  8. ^ "Escape Sequences". 3 August 2021. Character combinations consisting of a backslash \ followed by a letter or by a combination of digits are called escape sequences.
  9. ^ "Escape sequences". IBM.
  10. ^ "ISO/IEC 9899:201x Committee Draft N1570" (PDF). 5.1.1.2 Translation phases, 2.: Each instance of a backslash character (\) immediately followed by a new-line character is deleted, splicing physical source lines to form logical source lines. [...]
  11. ^ "17. Understanding ANSI.SYS - Special Edition Using MS-DOS? 6.22, Third Edition [Book]". www.oreilly.com.
  12. ^ "Basic Hayes AT Command Set". 2025-08-06. +++ - "Escape Sequence" - This command initiates an escape sequence to return the modem to the on-line command mode
  13. ^ "Modem Programming Basics". When a modem is in command mode, the modem can accept commands from you
  14. ^ "Chapter 5 – AT Commands" (PDF).
  15. ^ "AT Command Set and Register Summary for Analog Modem Modules". Cisco.
  16. ^ "Data General terminals: discussion of". FTP server (FTP).[dead ftp link] (To view documents see Help:FTP)
  17. ^ "What's a Terminal?". www.kermitproject.org.
  18. ^ "Data General DG210 DG211 Terminal Emulation Software".
  19. ^ "Escape sequence".
  20. ^ "Terminals & Printers Handbook Glossary". vt100.net.
  21. ^ "Twelve Useful "vi" Commands". vi commands […] Pressing the Esc (Escape) key is how you […]
  22. ^ "Five Unexpected Uses for the Esc Key". PCworld. 2025-08-06.
颢字五行属什么 耳朵里长痘是什么原因 孕期吃什么水果好 女性睾酮低意味着什么 幼对什么
感冒能吃什么 立春有什么讲究 比肩什么意思 核心抗体阳性说明什么 爸爸的哥哥的老婆叫什么
什么是扦插 上日下成念什么 脸发麻是什么病的前兆 回眸一笑百媚生什么意思 宝藏是什么意思
草果在炖肉起什么作用 女人烂桃花多说明什么 河东狮吼什么意思 男人屁股翘代表什么 sars是什么病毒
白羊女喜欢什么样的男生hcv9jop1ns2r.cn 4个月念什么字bjcbxg.com 眼睛浮肿什么原因hcv7jop6ns5r.cn 肌肉型肥胖是什么意思aiwuzhiyu.com 威士忌什么味道hcv9jop8ns2r.cn
人养玉三年玉养人一生是什么意思hcv9jop4ns6r.cn 什么的松脂hcv9jop0ns5r.cn 人怕冷是什么原因hcv8jop0ns9r.cn 肺疼是什么原因hcv8jop9ns4r.cn 智商是什么hcv9jop6ns1r.cn
什么好hcv8jop3ns7r.cn 纪委是什么hcv7jop7ns4r.cn 世界上什么最大hcv7jop9ns5r.cn aq什么意思hcv8jop3ns3r.cn 国际劳动日是什么生肖hcv8jop6ns4r.cn
为什么会长胎记hcv8jop1ns0r.cn 拉肚子吃什么bfb118.com 鸡血藤手镯有什么功效hcv8jop4ns0r.cn 三顾茅庐是什么意思hcv9jop5ns2r.cn tsh代表什么hcv8jop8ns0r.cn
百度