HOME

TheInfoList



OR:

A bell character (sometimes bell code) is a device control code originally sent to ring a small electromechanical bell on tickers and other teleprinters and teletypewriters 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". They have been used since 1870 (initially in the
Baudot code The Baudot code () is an early character encoding for telegraphy invented by Émile Baudot in the 1870s. It was the predecessor to the International Telegraph Alphabet No. 2 (ITA2), the most common teleprinter code in use before ASCII. Each ch ...
). To maintain
backward compatibility In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with Input ...
, video display terminals (VDTs) that replaced teletypewriters included speakers or buzzers to perform the same function, as did the personal computers that followed. Modern
terminal emulator A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term ''terminal'' covers all remote term ...
s often integrate the warnings to the desktop environment (e.g., the
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
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 ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
the bell character's value is 7 and is named "BELL" or "BEL".
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
does not give names to control characters but has assigned it the alias "ALERT" and abbreviation "BEL." It can sometimes be typed as and displayed as in
caret notation Caret notation is a notation for control characters in ASCII. The notation assigns to control-code 1, sequentially through the alphabet to assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the ...
. Unicode also includes characters for the visual representation of the character: and . In the 5-bit Baudot codes, BEL is represented by the number 11 (0x0B) when in "figures" mode. The code is used in EBCDIC. In the programming language C (created in 1972), and in many languages influenced by it such as Python, 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 the
backspace Backspace (, ⌫) is the keyboard key that in typewriters originally pushed the carriage one position backwards, and in modern computer systems typically moves the display cursor one position backwards,The meaning of "backwards" depends on the dir ...
character.


Usage

On
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems, or on MS-DOS or
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, a user can cause the equivalent of ringing the bell to happen by typing at the command prompt the command: echo ^G where the is produced by holding down and typing . On Unix the user may need to type + first to "quote" the . On POSIX systems, one may also use: printf '\a' and in the Bash shell, one may use ANSI-C quoting:ANSI-C quoting
/ref> echo $'\a' An alternative is to use the tput command, which as a part of the ncurses library is available on most Unix/Linux operating systems: tput bel 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.


See also

* C0 and C1 control codes (
ISO 646 ISO/IEC 646 ''Information technology — ISO 7-bit coded character set for information interchange'', is an International Organization for Standardization, ISO/International Electrotechnical Commission, IEC standard in the ...
)


References


ATIS Telcom Glossary

Free On-Line Dictionary of Computing, 'bell'
{{DEFAULTSORT:Bell Character Control characters