xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Tone()

Sounds a speaker tone with specific tone frequency and duration.

Syntax

Tone( <nFrequency>, [<nDuration>] ) --> NIL

Arguments

<nFrequency>
This is a positive numeric value specifying the frequency of the tone.
<nDuration>
This is a positive numeric value specifying the duration of the tone in units of 1/18th of a second.

Return

The function returns always NIL.

Description

Tone() is a compatibility function used to produce a speaker tone of defined frequency and duration.

Info

See also:Chr(), SET BELL
Category: Environment functions
Source:rtl\tone.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows a user-defined function that alerts a user
// when an error condition occurs.

   FUNCTION ErrorBeep()
      Tone( 1000, 1 )
      Tone( 1000, 2 )
   RETURN NIL

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe