XML

kent logo

CO631 Anonymous Questions and Answers Keyword Index

This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.

To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.

Keyword reference for beep

2003

Question 32 (2003):

Just a small question, what is the bell character? i.e. the one that makes the terminal bleep? I was told it was BELL, but if thats true do we have to output it one letter at a time ?

Answer 32:

No; `BELL' is a BYTE constant. Please refer to Question 13 (2003).

Keywords: bell , beep


Question 13 (2003):

For Q4 what is the command to make the terminal bleep when any other character is entered apart from those specified?

Answer 13:

Output an ASCII "bel" character:

    out ! BELL

The `BELL' constant is defined in `consts.inc', that is included by q4.occ.

The constant definition is simply:

    VAL BYTE BELL IS 7:

It may not work on some terminals -- i.e., those that cannot beep, or those that are configured not to beep.

Keywords: q4 , beep

Referrers: Question 32 (2003)

2002

Question 22 (2002):

When we send the bell command to the screen is the internal speaker meant to beep, as mine doesn't. All I get is a symbol of a bell in the lower window. Is this correct? Thanks.

Answer 22:

Unix shell windows (e.g. xterms and xvts) can be set to respond to the bell character (ASCII code 7) in several ways. These include:

That response is not up to your occam program - all it can do is send the character. Setting that response may be possible ... but you'll have to explore the idiosyncracies of your terminal emulator.

Keywords: bell , beep


Question 21 (2002):

How do we get the terminal to beep? Is there a character we need to send?

Answer 21:

See Question 18 (2000). One thing that answer didn't mention, though, is that you probably will also need to output a FLUSH to the screen channel (after sending the BELL). Otherwise, Unix buffers characters sent to the screen until either the buffer gets full or a new-line is output. So, if you want that beep straight away - rather than at the end of the current line of output - don't forget to FLUSH.

Reminder: please look through (and maybe print out) all questions and answers from previous years before re-asking them ...

Keywords: bell , beep

2001

Question 11 (2001):

In Question 4, for the monitor process we are asked to implement the following: `any other character is an error and is processed by bleeping the screen'. I've looked at last years Q+A's on the web but I can't find help on this. Could you give some kind of clue as to how we can produce a bleep from the PC squeaker in occam?

Answer 11:

You missed it! See the answer to Question 18 (2000).

Keywords: q4 , beep

2000

Question 18 (2000):

You say that when any other key is pressed for q4, then it should bleep ... How do we do this?

Answer 18:

If out is the parameter channel (that will be connected to the Unix screen channel), to get a bleep from your terminal:

    out ! BELL

where BELL is the ASCII BEL character, already declared in the (#INCLUDEd) consts.inc file as follows:

  VAL BYTE BELL IS 7:

Keywords: beep

Referrers: Question 21 (2002) , Question 11 (2001)

Valid CSS!

Valid XHTML 1.0!

Last modified Mon May 15 17:39:44 2006
This document is maintained by Fred Barnes, to whom any comments and corrections should be addressed.