What is an Escape Character?

Asked 2 years ago, Updated 2 years ago, 63 views

I'm not sure about escape characters, but

When expressing backslash, it is expressed like ¥, but
Are there any characters that have been decided as "escape characters"?

http://home.a00.itscom.net/hatada/c01/escape01.html
If you look here and so on, it says "C language escape letter"
Does it vary from language to language?

java ruby bash

2022-09-30 21:43

3 Answers

No, it's not true.

Java is described in the Escape Sequences section here.

The Java™ Tutorials-Characters

If you google keywords like "Escape Sequences" ruby, you'll find out about other languages.


2022-09-30 21:43

Escape characters are not limited to \ and vary by language.

For example, Windows batch file,

  • <;, |, & and ! symbols escape with ^ themselves.
  • The % representing the
  • variable is escaped by overlapping %%.


2022-09-30 21:43

Escape characters and escape sequences can be considered to be the process of eliciting features that are different from the source code's appearance among characters or strings in various languages.

So and and and and tags. ">ruby also uses inverted diagonal characters as escape characters, and the escape sequence is similar (not the same: see specifications, manuals, and references for each language). It may be for some reason or reason.

This is a delusion, but various languages have language users who are migrating to be easier to get into their camp.Yes, so it's possible to think that there was an implicit agreement to make it almost the same, rather than to confuse everyone by adopting their own specifications, even though there are no "decided characters" as escape characters.

The escape of cmd.exe and PowerShell that are not related to this situation has different characters and sequences.

/https://www.jpcert.or.jp/sc-rules/c-pre07-c.html

This causes / is disabled by default; it is not a feature that can be used when enabled with the compilation option -trigraphs and is so bad that -Wtrigraphs.Also discontinued in .


2022-09-30 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.