Bell character
Encyclopedia
A bell code is a device control code originally sent to ring a small electromechanical bell on tickers and other teleprinters (remote printer
Computer printer
In computing, a printer is a peripheral which produces a text or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most new printers, a...

s) and teletypewriters (such as Teletypes, abbreviated TTYs) to alert operators at the other end of the line, often of an incoming message. Though tickers punched the bell codes into their tapes, printers generally do not print a character when the bell code is received. Bell codes are usually represented by the label "BEL" and have been used since 1870 for instance in Baudot code
Baudot code
The Baudot code, invented by Émile Baudot, is a character set predating EBCDIC and ASCII. It was the predecessor to the International Telegraph Alphabet No 2 , the teleprinter code in use until the advent of ASCII. Each character in the alphabet is represented by a series of bits, sent over a...

.

To maintain backward compatibility, video display terminal
Computer terminal
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system...

s (VDTs) that replaced teletypewriters included speakers or buzzers to perform the same function, as did the personal computers that followed. Modern terminal emulator
Terminal emulator
A terminal emulator, terminal application, term, or tty for short, is a program that emulates a video terminal within some other display architecture....

s often integrate the warnings to the desktop environment (for example, the Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 Terminal will play the system warning sound) and also often offer a silent visual bell feature that flashes the terminal window briefly.

Representations

In ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 and Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 the character with the value 7 is BEL. It can be referred to as control-G or ^G in caret notation
Caret notation
Caret notation is a notation for unprintable control characters in ASCII encoding. The notation consists of a caret followed by a capital letter; this digraph stands for the ASCII code that has the numerical value equivalent to the letter's numerical value. For example the EOT character with a...

. Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 also includes a character for the visual representation of the bell code, "symbol for bell" at U+2407.

In the 5-bit Baudot code
Baudot code
The Baudot code, invented by Émile Baudot, is a character set predating EBCDIC and ASCII. It was the predecessor to the International Telegraph Alphabet No 2 , the teleprinter code in use until the advent of ASCII. Each character in the alphabet is represented by a series of bits, sent over a...

s (created by Émile Baudot
Émile Baudot
Jean-Maurice-Émile Baudot , French telegraph engineer and inventor of the first means of digital communication Baudot code, was one of the pioneers of telecommunications...

 in 1870, patented in 1874, modified by Donald Murray
Donald Murray
Sir Donald Bruce Murray was a Lord Justice of Appeal of the Supreme Court of Northern Ireland. Born in Belfast, Northern Ireland, he was educated at Belfast Royal Academy and the Queen's University, Belfast as well as Trinity College Dublin...

 in 1901, and standardized by CCITT as International Telegraph Alphabet No. 2 (ITA2) in 1930), BEL is represented by the number 11 (0x0B) when in "figures" mode.

In the C programming language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 (created in 1972), the bell character can be placed in a string or character constant with \a ('a' stands for "alert" or "audible" and was chosen because \b was already used for backspace).

Usage

On Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 systems, MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 or Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, you can cause the equivalent of ringing the bell to happen by typing at the command prompt the command:

echo ^G

where the ^G is produced by holding down and typing . On Unix you may need to type + first to "quote" the ^G.

A program can get the same result by printing the BEL character to a terminal.

On modern systems this may not make a noise, it may instead make a visual indication such as flashing the screen, or do nothing at all.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK