BEEP
From QB64 Wiki
The BEEP statement produces a beeping sound through the sound card(QB64) or PC speaker(QB) if it has one.
- BEEP
Description:
- BEEP can be placed anywhere to alert the user that there is something to do or an error has occurred.
- ASCII control character 7 can also create a BEEP sound when you PRINT it (See CHR$).
- In Windows it may produce a "thunk" warning sound when a Qbasic program is running in a SCREEN 0 window.
- Newer PC's may not have an internal speaker to hear ANY Qbasic sounds!
- QB64 produces the actual "beep" sound through the PC's stereo speakers.
- To produce the BEEP sound character in a QBasic(.BAS) or a batch(.BAT) file using a DOS editor (or the QB IDE) press Ctrl + P then G. PRINT it inside of quotation marks to beep in QB. Use the character after ECHO in a batch file. Not in the QB64 IDE!
Code Examples:
Example: Creating two beep sounds using BEEP and printing the ASCII control character 7.
See also: