LINFO

Ampersand Definition



An ampersand (&) is a logogram that is commonly used to represent the word and in the English language. It also has several additional uses in the computer software field.

A logogram is a single written character which represents a word or a morpheme (i.e., a meaningful unit in a language). Other examples of logograms include the Arabic numerals (e.g., 1, 2 and 3), the dollar sign ($) and Chinese characters. Characters are the basic symbols that are used to write or print a language.

The ampersand is a very old symbol. It dates back to at least the first century A.D., when it was used in writing the Latin language. It was originally a ligature (i.e., a combination) of the letters e and t, which formed the Latin word for and. Over the centuries it became more rounded and simplified so that today there is little resemblance to the letters e and t. The origin of the word ampersand is generally believed to be the phrase and per se and.

Because of its very common usage, the ampersand was incorporated into standard typewriter keyboards, and subsequently into computer keyboards (which are based on typewriter keyboards). It was also incorporated into ASCII (American Standard Code for Information Interchange), the de facto standard for the character encoding used by computers and communications equipment to represent text.

The usage of the ampersand is subtly different from the usage of the word and in the English language. That is, the ampersand is not usually used in the main body of a piece of well-written text in place of the word and. Rather, its primary use is in proper names, particularly of businesses, where it often implies a closer relationship or connection than the word and.

Some of the uses of the ampersand in the computer field are related to the meaning and, and some are not. In some computer programming languages, a double ampersand is used to indicate the logical and operator, which indicates that a statement is true if both of the operands (i.e., conditions) are true.

The C programming language, and other languages with a similar syntax, differentiate between two ampersands in succession (i.e., &&) for a logical and and a single ampersand for a bitwise and (which performs an and comparison between two groups of bits). In both C and C++, the ampersand is also used at the start of a variable name to reference to the memory address of that variable in order to change the variable's value.

An ampersand typed in at the end of a command (inclusive of all of its options and arguments) on the command line (i.e., all-text mode) on a Unix-like operating system indicates that the command is to be processed in the background. That is, the process started by the command can continue to operate even if other commands are subsequently entered at the command line.

In SGML (standard generalized markup language) and its descendants, such as HTML (hypertext markup language) and XML (extensible markup language), the ampersand is used to begin the encoding that represents a special character (i.e., a character that is not included in the limited standard character set), and such encoding is terminated with a semicolon. For example, the HTML encoding for the at symbol (@) so that it will render correctly in a web browser is @, and the encoding for the copyright symbol (©) is ©. The ampersand can be encoded with a choice of & and &#amp;.






Created March 10, 2006.
Copyright © 2006 The Linux Information Project. All Rights Reserved.