Terminal control/Ringing the terminal bell: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created task with Tcl implementation)
 
(→‎{{header|PureBasic}}: Added PureBasic)
Line 2: Line 2:
Make the terminal running the program ring its “bell”. That is often done on modern systems by playing some other sound which might or might not be configurable, but was classically a physical bell within the terminal. It is usually used to indicate a problem where a wrong character has been typed.
Make the terminal running the program ring its “bell”. That is often done on modern systems by playing some other sound which might or might not be configurable, but was classically a physical bell within the terminal. It is usually used to indicate a problem where a wrong character has been typed.


=={{header|PureBasic}}==
<lang PureBasic>Print(#BEL$)</lang>
=={{header|Tcl}}==
=={{header|Tcl}}==
<lang tcl>puts -nonewline "\a";flush stdout</lang>
<lang tcl>puts -nonewline "\a";flush stdout</lang>

Revision as of 15:49, 17 October 2010

Task
Terminal control/Ringing the terminal bell
You are encouraged to solve this task according to the task description, using any language you may know.

Make the terminal running the program ring its “bell”. That is often done on modern systems by playing some other sound which might or might not be configurable, but was classically a physical bell within the terminal. It is usually used to indicate a problem where a wrong character has been typed.

PureBasic

<lang PureBasic>Print(#BEL$)</lang>

Tcl

<lang tcl>puts -nonewline "\a";flush stdout</lang>