Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

TONE()

Sound a tone with a specified frequency and duration.
---------------------------------------------------------------------------------

 Syntax

        TONE( <nFrequency>, <nDuration> ) --> NIL  

 Arguments

        <nFrequency>    A non-negative numeric value that specifies the 
                  frequency of the tone in hertz.

        <nDuration>     A positive numeric value which specifies the 
                  duration of the tone in 1/18 of a second units.

 Returns

        TONE()   always returns NIL.    

 Description

      TONE() is a sound function that could be used to irritate the end
      user, his or her dog, and the surrounding neighborhood. The
      frequency  is clamped to the range 0 to 32767 Hz.

 Examples

      If lOk   // Good Sound
         TONE(  500, 1 )
         TONE( 4000, 1 )
         TONE( 2500, 1 )
      Else     // Bad Sound
         TONE(  300, 1 )
         TONE(  499, 5 )
         TONE(  700, 5 )
      EndIf
      

 Tests

      TONE( 800, 1 )                         // same as ? CHR(7)
      TONE( 32000, 200 )                     // any dogs around yet?
      TONE( 130.80, 1 )                      // musical note - C
      TONE( 400, 0 )                         // short beep
      TONE( 700 )                            // short beep
      TONE( 10, 18.2 )                       // 1 second delay
      TONE( -1 )                             // 1/18.2 second delay
      TONE( )                                // 1/18.2 second delay
  

 Tests


Status

      Started

 Compliance

      TONE() works exactly like CA-Clipper's TONE().

 Platforms

      All

 Files

      Library is rtl



See Also: CHR() SET BELL

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson