Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Representations  





2 Usage  





3 See also  





4 References  














Bell character






Čeština
Deutsch
Euskara
Français


Português
 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




Print/export  



















Appearance
   

 






From Wikipedia, the free encyclopedia
 


This is an old revision of this page, as edited by Torresjrjr (talk | contribs)at03:02, 19 October 2021 (Replace unreliable "echo -e" example). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff)  Previous revision | Latest revision (diff) | Newer revision  (diff)

Abell code (sometimes bell character) 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,[1] 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).[citation needed]

To maintain backward compatibility, 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 emulators often integrate the warnings to the desktop environment (e.g., the macOS Terminal will play the system warning sound) and also often offer a silent visual bell feature that flashes the terminal window briefly.

Representations

InASCII and Unicode the character with the value 7 is BEL. It can be referred to as control-G or ^Gincaret notation. Unicode also includes a character for the visual representation of the bell code, "symbol for bell" (␇) at U+2407, not to mention U+237E (⍾).

In the 5-bit Baudot codes, BEL is represented by the number 11 (0x0B) when in "figures" mode.[2]

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 character.)[3]

Usage

photograph of the keyboard for an Osborne 1 computer showing how the word "Bell" is also printed on the key for the letter "G"
Keyboard for the Osborne 1

OnUnix-like systems, or on MS-DOSorWindows, a user 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 Ctrl and typing G. On Unix the user may need to type Ctrl+V first to "quote" the ^G.

On POSIX systems, one may also use:

printf '\a'

and in the Bash shell, one may use ANSI-C quoting:[4]

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

References

  1. ^ "Baudot". Archived from the original on December 19, 2008. Retrieved February 1, 2009.
  • ^ "The Lorenz Cipher and how Bletchley Park broke it". www.codesandciphers.org.uk. Retrieved 9 July 2016.
  • ^ "2. Lexical analysis — Python 2.7.18 documentation". docs.python.org. Retrieved 2021-02-05.
  • ^ ANSI-C quoting

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Bell_character&oldid=1050649914"

    Category: 
    Control characters
    Hidden categories: 
    Articles needing additional references from July 2011
    All articles needing additional references
    All articles with unsourced statements
    Articles with unsourced statements from September 2010
     



    This page was last edited on 19 October 2021, at 03:02 (UTC).

    This version of the page has been revised. Besides normal editing, the reason for revision may have been that this version contains factual inaccuracies, vandalism, or material not compatible with the Creative Commons Attribution-ShareAlike License.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki