Macros and the IBM CognosScript Language  7.5.0
IBM CognosScript Statements and Functions >

Beep Statement

Description

Produces a tone through the computer speaker.

Syntax

Beep

Comments

The frequency and duration of the tone depends on the hardware.

Example

This example beeps and displays a message in a box if the variable balance is less than 0. (If you have a set of speakers hooked up to your computer, you might need to turn them on to hear the beep.)

Sub main
   Dim expenses, balance, msgtext
   balance=InputBox("Enter your account balance")
   expenses=1000
   balance=balance-expenses
   If balance<0 then
      Beep
      Msgbox "I'm sorry, your account is overdrawn."
   Else
      Msgbox "Your balance minus expenses is: " &
balance
   End If
End Sub

See Also

InputBox Function

Msgbox Statement

Print Statement