Product Code Database
Example Keywords: sweatshirt -jelly $15-147
   » » Wiki: Backslash
Tag Wiki 'Backslash'.
Tag

Backslash
 (

The backslash ( \) is a typographical mark () used mainly in and is the of the common slash (/). It is sometimes called a hack, whack, (from C/), reverse slash, slosh, downwhack, backslant, backwhack, bash, reverse slant, and reversed virgule. Macquarie Dictionary (3rd edition) In , it is encoded at .


History
introduced the \ character into on September 18, 1961, as the result of character frequency studies. In particular, the \ was introduced so that the ALGOL boolean operators ∧ (AND) and ∨ (OR) could be composed in ASCII as /\ and \/ respectively. "How ASCII Got Its Backslash", Bob Bemer Both these operators were included in early versions of the C programming language supplied with Unix V6, Unix V7 and more currently BSD 2.11.


Usage
In many programming languages such as C, , , Python and in scripting languages, the backslash is used as an , to indicate that the character following it should be treated specially (if it would otherwise be treated normally), or normally (if it would otherwise be treated specially). For instance inside a C quoted string the sequence \n produces a byte instead of an 'n', and the sequence \" produces an actual double quote rather than the special meaning of the double quote ending the string. In various regular expression languages it is used this way, changing subsequent literal characters into and vice versa. Following this usage, the double backslash sequence \\ produces a normal literal backslash.

Outside strings, the only common use in languages is at the end of a line to indicate that the trailing character should be ignored, so that the following line is treated as if it were part of the current line. In this context it may be called a "continuation".

The ALGOL 68 programming language uses the "\" as its Decimal Exponent Symbol. ALGOL 68 has the choice of 4 Decimal Exponent Symbols: e, E, \, or 10. Examples: 6.0221415e23, 6.0221415E23, 6.0221415\23 or 6.02214151023.

The backslash is used in the system and in RTF files to begin markup tags. In Haskell, the backslash is used both to introduce special characters and to introduce lambda functions (since it is a reasonable approximation in ASCII of the Greek letter lambda, λ).O'Sullivan, Stewart, and Goerzen, Real World Haskell, ch. 4: anonymous (lambda) functions, p.99

2.0, released 1983, copied the hierarchical file system from Unix and thus used the (forward) slash, but (possibly on the insistence of IBM) added the backslash to allow paths to be typed at the command line interpreter's prompt while retaining compatibility with MS-DOS 1.0 and CP/M where the slash was the command-line option indicator (typing "DIR/W" gave the "wide" option to the "DIR" command, so some other method was needed if you actually wanted to run a program called W inside a directory called DIR). Except for COMMAND.COM, all other parts of the operating system accept both characters in a path, but the Microsoft convention remains to use a backslash, and APIs that return paths use backslashes. This holds true for MS-DOS and , but also all other DOS operating systems like , , or as well as to , , , 4680 OS, 4690 OS, OS/2 and . In some versions of DOS, the option character can be changed from / to - via , which allows COMMAND.COM to preserve / in the command name.

The Microsoft Windows family of operating systems inherited the MS-DOS behavior and so still support either character – but individual Windows programs and sub-systems may, wrongly, only accept the backslash as a path delimiter, or may misinterpret a forward slash if it is used as such. Some programs will only accept forward slashes if the path is placed in . The failure of Microsoft's security features to recognize unexpected-direction slashes in local and Internet paths, while other parts of the operating system still act upon them, has led to some serious lapses in security. Resources that should not be available have been accessed with paths using particular mixes, such as <nowiki></nowiki>.

In , a backslash-like symbol is used for the set difference. The backslash is also sometimes used to denote the right space.

In some dialects of the programming language, the backslash is used as an operator symbol to indicate integer division.

In and the backslash is used for left , while the slash is for right matrix divide.

In version 5.3 and higher, the backslash is used to indicate a .

In USFM, the backslash is used to mark format features for editing Bible translations.

In the , the backslash is used for the voiced pharyngeal fricative.


Confusion in usage
In the Japanese encodings ISO 646 (a 7-bit code based on ), JIS X 0201 (an 8-bit code), and (a multi-byte encoding which is 8-bit for ASCII), the 0x5C that would be used for backslash in ASCII is instead rendered as a yen mark (¥), while in encoding, it is drawn as a (₩). Computer programs still treat the code as a backslash in these environments, causing confusion, especially in MS-DOS filenames. Due to extensive use of the backslash code point to represent the yen mark, even today some fonts like render the backslash character as a ¥, so the Unicode characters 00A5 (¥) and 005C (\) look identical when these fonts are selected. Several other ISO 646 versions also replace backslash with characters like Ö (German, Swedish), Ø (Danish, Norwegian), ç (French) and Ñ (Spanish), leading to similar problems. Since the character was originally not available in all character sets and keyboard layouts, can transcribe it in form of the ??/ which, outside , is equivalent to the \ character. RFC 1345 recommends to transcribe the character as digraph //, if not available.


External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs