请输入您要查询的百科知识:

 

词条 Bell character
释义

  1. Representations

  2. Usage

  3. See also

  4. References

{{refimprove|date=July 2011}}

A bell 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|date=September 2010}}

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 Mac OS X 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 and Unicode the character with the value 7 is BEL. It can be referred to as control-G or ^G in caret notation. Unicode also includes a character for the visual representation of the bell code, "symbol for bell" (␇) at U+2407.

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

In the C programming language (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 the backspace character.)

Usage

On Unix-like systems, or on MS-DOS or Windows, a user can cause the equivalent of ringing the bell to happen by typing at the command prompt the command:

where the ^G is produced by holding down {{keypress|Ctrl}} and typing {{keypress|G}}. On Unix the user may need to type {{keypress|Ctrl}}+{{keypress|V}} first to "quote" the ^G.

On Linux one may also use:

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

An alternative is to use the tput command, which as a part of the ncurses library is available on most Unix/Linux operating systems:

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)

References

1. ^{{cite web|title=Baudot |url=http://chem.ch.huji.ac.il/history/baudot.html |accessdate=February 1, 2009 |deadurl=yes |archiveurl=https://web.archive.org/web/20081219135647/http://chem.ch.huji.ac.il/history/baudot.html |archivedate=December 19, 2008 }}
2. ^{{cite web|title=The Lorenz Cipher and how Bletchley Park broke it|url=http://www.codesandciphers.org.uk/lorenz/fish.htm|website=www.codesandciphers.org.uk|accessdate=9 July 2016}}
3. ^[https://www.gnu.org/software/bash/manual/bash.html#ANSI_002dC-Quoting ANSI-C quoting]
  • [https://web.archive.org/web/20160303230740/http://www.atis.org/glossary/definition.aspx?id=5756 ATIS Telcom Glossary]
  • Free On-Line Dictionary of Computing, 'bell'
{{DEFAULTSORT:Bell Character}}

1 : Control characters

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 5:15:10