HOME

TheInfoList



OR:

A bell code (sometimes bell character) is a device
control code In computing and telecommunication, a control character or non-printing character (NPC) is a code point (a number) in a character set, that does not represent a written symbol. They are used as in-band signaling to cause effects other than t ...
originally sent to ring a small electromechanical bell on tickers and other
teleprinter A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point and point-to-multipoint configurations. Init ...
s 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 Baudot code). To maintain backward compatibility, video display
terminal Terminal may refer to: Computing Hardware * Terminal (electronics), a device for joining electrical circuits together * Terminal (telecommunication), a device communicating over a line * Computer terminal, a set of primary input and output devi ...
s (VDTs) that replaced teletypewriters included speakers or buzzers to perform the same function, as did the personal computers that followed. Modern terminal emulators often integrate the warnings to the desktop environment (e.g., the
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
Terminal Terminal may refer to: Computing Hardware * Terminal (electronics), a device for joining electrical circuits together * Terminal (telecommunication), a device communicating over a line * Computer terminal, a set of primary input and output devi ...
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 ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
and
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
the character with the value 7 is BEL. It can be referred to as control-G or in caret notation. Unicode also includes a character for the visual representation of the bell code, "symbol for bell" (␇) at U+2407, and graphic for the control code (⍾) at U+237E. In the 5-bit Baudot codes, BEL is represented by the number 11 (0x0B) when in "figures" mode. In the programming languages C (created in 1972) and Python (created in 1991), 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 originally pushed the typewriter carriage one position backwards and in modern computer systems moves the display cursor one position backwards,"Backwards" means to the left for left-to-right languages. delete ...
character.)


Usage

On
Unix-like A Unix-like (sometimes referred to as UN*X 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 Unix-li ...
systems, or on
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few o ...
or
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
, a user can cause the equivalent of ringing the bell to happen by typing at the
command prompt Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows (Windows NT family and Windows CE family), and ReactOS operating systems. On Windows CE .NET 4.2, ...
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 Bash or BASH may refer to: Arts and entertainment * ''Bash!'' (Rockapella album), 1992 * ''Bash!'' (Dave Bailey album), 1961 * '' Bash: Latter-Day Plays'', a dramatic triptych * ''BASH!'' (role-playing game), a 2005 superhero game * "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 The C0 and C1 control code or control character sets define control codes for use in text by computer systems that use ASCII and derivatives of ASCII. The codes represent additional information about the text, such as the position of a curso ...
( ISO 646)


References


ATIS Telcom Glossary

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