To beep or not to beep.

Karl Heuer karl at haddock.ima.isc.com
Wed Jun 13 11:48:07 AEST 1990


In article <3538 at umn-d-ub.D.UMN.EDU> halam2 at umn-d-ub.D.UMN.EDU (Haseen I. Alam) writes:
>But my main interest is to get the users attention.  Is beeping a BAD
>practice to do this?  How else can I get the users attention?

Why do you believe you've lost the user's attention in the first place?  What
kind of program are we talking about?

>I would like to know some other techniques.

If you're using (a modern version of) curses(), there is a pair of routines
beep() and flash() that are commonly used to indicate an error.  The polite
protocol is to allow the user to specify which one is desired:
	void error() { if (user_prefers_flash) flash(); else beep(); }
(If the hardware is not capable of both flash and beep, then the two routines
are equivalent.)

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list