All Topics  
Backslash

 

   Email Print
   Bookmark   Link






 

Backslash



 
 
The backslash ( \ ) is a typographical mark (glyph
Glyph

A glyph is an element of writing. Two or more glyphs representing the same symbol, whether interchangeable or context-dependent, are called allographs; the abstract unit they are variants of is called a grapheme or character ....
) used chiefly in computing
Computing

Computing is usually defined as the activity of using and developing computer technology, computer hardware and computer software. It is the computer-specific part of information technology....
. It was first introduced to computers in 1960 by Bob Bemer
Bob Bemer

Robert William Bemer was a computer scientist best known for his work at IBM during the late 1950s and early 1960s....
. Sometimes called a reverse solidus or an oblique, it is the mirror image of the common slash
Slash (punctuation)

The slash is a punctuation mark. It is also called a virgule, diagonal, stroke, forward slash, oblique dash, slant, separatrix, scratch comma, over, slak, whack....
. It is also known as a slosh.

Other common terms for the character include hack
Hack

Hack may refer to:* Hack , a term used in the technology and computer science fields* Hack , a row of stacked unfired bricks protected from the rain...
, escape
Escape character

In computing and telecommunication, an escape character is a single character which in a sequence of characters signifies that what is to follow takes an alternative interpretation....
 (from C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
/UNIX
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
), reverse slash, backslant, and backwhack. Also, it is sometimes referred as bash, reverse slant, reversed virgule, or backslat.

lass="link1" onMouseover='showByLink("m805056",this)' onMouseout='hide("m805056")'href="http://www.absoluteastronomy.com/topics/Bob_Bemer">Bob Bemer
Bob Bemer

Robert William Bemer was a computer scientist best known for his work at IBM during the late 1950s and early 1960s....
 introduced the \ character into ASCII, on September 18, 1961, as the result of character frequency studies.






Discussion
Ask a question about 'Backslash'
Start a new discussion about 'Backslash'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The backslash ( \ ) is a typographical mark (glyph
Glyph

A glyph is an element of writing. Two or more glyphs representing the same symbol, whether interchangeable or context-dependent, are called allographs; the abstract unit they are variants of is called a grapheme or character ....
) used chiefly in computing
Computing

Computing is usually defined as the activity of using and developing computer technology, computer hardware and computer software. It is the computer-specific part of information technology....
. It was first introduced to computers in 1960 by Bob Bemer
Bob Bemer

Robert William Bemer was a computer scientist best known for his work at IBM during the late 1950s and early 1960s....
. Sometimes called a reverse solidus or an oblique, it is the mirror image of the common slash
Slash (punctuation)

The slash is a punctuation mark. It is also called a virgule, diagonal, stroke, forward slash, oblique dash, slant, separatrix, scratch comma, over, slak, whack....
. It is also known as a slosh.

Other common terms for the character include hack
Hack

Hack may refer to:* Hack , a term used in the technology and computer science fields* Hack , a row of stacked unfired bricks protected from the rain...
, escape
Escape character

In computing and telecommunication, an escape character is a single character which in a sequence of characters signifies that what is to follow takes an alternative interpretation....
 (from C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
/UNIX
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
), reverse slash, backslant, and backwhack. Also, it is sometimes referred as bash, reverse slant, reversed virgule, or backslat.

Usage

Bob Bemer
Bob Bemer

Robert William Bemer was a computer scientist best known for his work at IBM during the late 1950s and early 1960s....
 introduced the \ character into ASCII, on September 18, 1961, as the result of character frequency studies. In particular the \ was introduced so that the ALGOL boolean operators
ALGOL 68

ALGOL 68 is an imperative programming computer programming programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously defined syntax and semantics....
 "∧" (AND) and "∨" (OR) could be composed in ASCII as "/\" and "\/" respectively.

In many programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s such as C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 and Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
 and in Unix
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
 scripting languages, the backslash is used to indicate that the character following it should be treated specially. It is sometimes referred to as a knock-down or escape character
Escape character

In computing and telecommunication, an escape character is a single character which in a sequence of characters signifies that what is to follow takes an alternative interpretation....
. In various regular expression
Regular expression

In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters....
 languages it acts as a switch, changing literal characters into metacharacter
Metacharacter

A metacharacter is a character that has a special meaning to a computer program, such as a Operating system shell or a regular expression engine....
s and vice versa. The backslash is used similarly in the TeX
TeX

TeX is a typesetting system designed and mostly written by Donald Knuth. Together with the METAFONT language for font description and the Computer Modern typefaces, it was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonable amount of effort, and to provide a system that would give the exact...
 typesetting
Typesetting

Typesetting involves the presentation of textual material in graphic form on paper or some other Recording medium. Before the advent of desktop publishing, typesetting of printed material was produced in print shops by compositors or typesetters working by hand, and later with machines....
 system and in RTF
Rich Text Format

The Rich Text Format is a document file format file format developed by Microsoft in 1987 for cross-platform document interchange. Most word processors are able to read and write RTF documents....
 files to begin markup tags. In Haskell
Haskell (programming language)

Haskell is a standardized, purely functional programming language with non-strict programming language, named after logician Haskell Curry. The goals of the language are described as:...
, 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, ?).

In the context of line-oriented text, especially source code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
 for some programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s, it is often used at the end of a line to indicate that the trailing newline
Newline

In computing, a newline is a special character or sequence of characters signifying the end of a line of text. The name comes from the fact that the next character after the newline will appear on a new line?that is, on the next line below the text, immediately proceeding the newline....
 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 GNU make manual says
We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read.
The Microsoft Windows system API
Windows API

The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems....
 can accept either the backslash or slash to separate directory and file components of a path
Path (computing)

A path is the general form of a computer file or directory name, specifying a unique location in a file system. A path points to a file system location by following the directory tree hierarchy expressed in a string of character in which path components, separated by a delimiting character, represent each directory....
, but the Microsoft convention is to use a backslash, and APIs that return paths put backslash in. The slash would have been the preferred path delimiter, but MS-DOS 2 added the backslash to allow paths to be typed into the command shell while retaining compatibility with CP/M
CP/M

CP/M is an operating system originally created for Intel 8080/Intel 8085 based microcomputers by Gary Kildall of Digital Research. Initially confined to single tasking on 8-bit processors and no more than 64 kilobytes of memory, later versions of CP/M added multi-user variations, and were migrated to 16-bit processors....
—before directories were supported—where the slash was chosen as the command-line option indicator. For instance you could still use the "wide" option to the "dir" command by typing "dir/w", yet you can run the program "w" in the subdirectory "dir" with "dir\w". World Wide Web
World Wide Web

The World Wide Web is a very large set of interlinked hypertext documents accessed via the Internet. With a Web browser, one can view Web pages that may contain writing, s, videos, and other multimedia and navigate between them using hyperlinks....
 URL paths always exclusively contain slashes
Slash (punctuation)

The slash is a punctuation mark. It is also called a virgule, diagonal, stroke, forward slash, oblique dash, slant, separatrix, scratch comma, over, slak, whack....
, sometimes referred to as "forward" slashes for clarity.

In the Japanese
Japanese language

IPA: [n?iho?go] is a language spoken by over 130 million people in Japan and in Japanese emigrant communities. It is related to the Ryukyuan languages....
 ISO 646 encoding (a 7-bit code based on ASCII
ASCII

American Standard Code for Information Interchange , is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words....
), the code point
Code point

In character encoding terminology a code point is any of the numerical values that make up the codespace. For example, ASCII comprises 128 code points in the range 0Hexadecimal to 7Fhex, Extended ASCII comprises 256 code points in the range 0Hexadecimal to FFhex, and Unicode comprises 1,114,112 code...
 that would be used for backslash in ASCII is instead a yen mark
¥

? is a currency sign used for the following currency:* Renminbi * Japanese yen The base unit of the two currencies above share the same Chinese character , pronounced yuan in Mandarin Chinese and en in Japanese language....
 (¥), while in Korean
Korean language

Korean is the official language of North Korea and South Korea. It is also one of the two official languages in the Yanbian Korean Autonomous Prefecture in People's Republic of China....
 encoding, the code point for backslash is the won currency symbol (? or W). Computer programs (such as Windows filenames) still treat it as a backslash in these environments, causing confusion. Due to extensive use of the backslash code to represent the yen mark in text, some Unicode fonts like MS Mincho render the backslash character as a ¥, so the Unicode
Unicode

Unicode is a computing industry standard allowing computers to consistently represent and manipulate Character expressed in most of the world's writing systems....
 characters 00A5 (¥) and 005C (\) look identical when these fonts are selected.

In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a backslash-like symbol is used for the set difference
Complement (set theory)

In discrete mathematics and predominantly in set theory, a complement is a concept used in comparisons of sets to refer to the unique values of one set in relation to another....
.

In some dialects of the BASIC
BASIC

In computer programming, BASIC is a family of high-level programming languages. The Dartmouth BASIC was designed in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College in New Hampshire, United States to provide computer access to non-science students....
 programming language, the backslash is used as an operator symbol to indicate integer
Integer (computer science)

In computer science, the term integer is used to refer to a data type which represents some finite subset of the mathematical integers. These are also known as integral data types....
 division
Division (mathematics)

In mathematics, especially in elementary arithmetic, division is an arithmetic operation which is the inverse of multiplication.Specifically, if c times b equals a, written:...
.

In MATLAB
MATLAB

MATLAB is a Numerical analysis environment and programming language. Maintained by The MathWorks, MATLAB allows easy matrix manipulation, plotting of function and data, implementation of algorithms, creation of user interfaces, and interfacing with programs in other languages....
, the backslash is used for left matrix
Matrix (mathematics)

In mathematics, a matrix is a rectangular array of numbers, as shown at the right. In addition to a number of elementary, entrywise operations such as matrix addition a key notion is matrix multiplication....
 divide, while the slash is for right matrix divide.

External links

  • Larry Osterman (2005-06-24),
  • Bob Bemer,
  • by The Linux Information Project (LINFO)