Backslash
\
The backslash (English, composed of: back = backwards and slash = backslash) - more rarely also called backslash, backslash, backslash, "left-slash", "backslash" or "backslash" - is the character "\".
The backslash is located on the German keyboard on the same key as the ß (eszett) and can be created with the key combination Alt Gr + ß. On the Swiss keyboard, it is located at the < character. On an Apple keyboard under Mac OS or macOS, it is accessed by the combination Alt + ⇧ + 7, among other options and using a suitable (e.g. German) keyboard layout.
Under DOS and Windows, it is the directory separator in a path specification; however, under Korean locale, the separator is represented as ₩ (won character), or under Japanese locale, as ¥ (yen character) instead of \. In addition, \ also stands for the root directory under DOS and Windows. The combination \\ is used in UNC paths.
In some programming languages, such as C, C++, and related, the backslash is used as an escape character to represent special characters (for example, "\n" for a newline), and in Visual Basic it performs integer division. In the Unix shell and some other line-oriented programming languages, the backslash is used to mask special characters. For example, at the end of a line, the backslash is used to mask the line break, thereby unifying several lines of text into one logical line. In Haskell, the backslash is used to mark an anonymous function, also called a lambda function or lambda expression, because of its similarity to the Greek letter lambda (λ).
Its inclusion in the ASCII standard (position 92 decimal) was suggested by Bob Bemer. The backslash serves as a separator, since it rarely occurs in texts.
In set theory, a backslash serves as a symbol for forming a difference set. For example, means "A without B". In Unicode, the difference set character has its own character U+2216 (set minus) "∖".
Representation in computer systems
Name | Characters | Unicode | HTML | TeX | |||
Position | Name | hexadecimal | decimal | plain TeX | LaTeX | ||
Backslash | \ | U+005C | reverse solidus |
|
|
|
|
Backslash as combining character | U+20E5 | Combining reverse solidus overlay |
| ||||
Difference quantity sign | U+2216 | Set minus |
|
|
| ||
Diagonal line top left-bottom right | U+2572 | Box drawings light diagonal upper left to lower right |
| ||||
Operator backslash | U+29F5 | Reverse solidus operator |
| ||||
backslash with slash | U+29F7 | Reverse solidus with horizontal stroke |
| ||||
big backslash | U+29F9 | Big reverse solidus |
| ||||
minor backslash | ﹨ | U+FE68 | Small reverse solidus |
| |||
full-width backslash | \ | U+FF3C | Fullwidth reverse solidus |
|
Backslash in local public transport
In local public transport in certain cities, a backslash after the line number is used to indicate so-called crossed-out lines. This applies in particular to older matrix or flip-dot displays, which are not able to show the intended crossing out of the line number due to their coarse image resolution. An example of this is the Belgian city of Liège.