BEEP: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
m (Protected "BEEP" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The [[BEEP]] statement produces a beep sound through the sound card.
The '''BEEP''' statement produces a beep sound through the sound card.




Line 7: Line 7:


{{PageDescription}}
{{PageDescription}}
* [[BEEP]] can be placed anywhere to alert the user that there is something to do or an error has occurred.
* The '''BEEP''' statement can be used anywhere in the code to alert the user that there is something to attend to or an error has occurred.
* '''QB64''' produces the actual "beep" sound through the PC's sound card, to emulate QBasic's beeping through the [https://en.wikipedia.org/wiki/PC_speaker PC speaker].
* QB64 produces the actual "beep" sound through the PC's sound card, emulating QBasic's beeping through the [[Wikipedia:PC speaker|PC speaker]].




==QBasic/QuickBASIC==
{{PageAvailability}}
* Older programs may attempt to produce a BEEP by printing [[CHR$]](7) to the screen. This is no longer supported in QB64 after '''version 1.000'''.
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no -->
** You may have to replace instances of PRINT CHR$(7) in older programs to the [[BEEP]] statement to maintain the legacy functionality.
<gallery widths="48px" heights="48px" mode="nolines">
File:Qb64.png|'''v0.610'''
File:Qbpe.png|'''all'''
File:Apix.png
File:Win.png|'''yes'''
File:Lnx.png|'''yes'''
File:Osx.png|'''yes'''
</gallery>
<!-- additional availability notes go below here -->
* There used to be the ability to produce a beep by printing [[CHR$]](7) to the screen. This functionality was no longer available since '''QB64 v0.960''', when SDL audio was exchanged by OpenAL audio.
* In '''QB64-PE v4.0.0''' the beeping functionality using [[PRINT]] [[CHR$]](7) has been restored.




{{PageSeeAlso}}
{{PageSeeAlso}}
* [[SOUND]], [[PLAY]]
* [[SOUND]], [[PLAY]]
* [[_SNDPLAY]] {{text|(play sound files)}}
* [[_SNDPLAY]], [[_SNDRAW]]
* [[_SNDRAW]] {{text|(play frequency waves)}}




{{PageNavigation}}
{{PageNavigation}}

Latest revision as of 19:26, 22 November 2024

The BEEP statement produces a beep sound through the sound card.


Syntax

BEEP


Description

  • The BEEP statement can be used anywhere in the code to alert the user that there is something to attend to or an error has occurred.
  • QB64 produces the actual "beep" sound through the PC's sound card, emulating QBasic's beeping through the PC speaker.


Availability

  • There used to be the ability to produce a beep by printing CHR$(7) to the screen. This functionality was no longer available since QB64 v0.960, when SDL audio was exchanged by OpenAL audio.
  • In QB64-PE v4.0.0 the beeping functionality using PRINT CHR$(7) has been restored.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link