Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>on play(n) trap for background music remaining</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ON PLAY(n)               Trap for Background Music Remaining

 ON PLAY(queuelimit) GOSUB {linenum | linelabel}

    Establishes a subroutine to which QuickBASIC will branch if fewer than
    a specified number of notes remain in the background music buffer.     T
    he trap must also be turned on by means of a PLAY ON statement.

  queuelimit    An integer expression in the range 1 to 32 specifying the
                number of notes to be trapped.

     linenum    The first line of a music-handling subroutine. Setting
                linenum to 0 disables trapping.

   linelabel    A label identifying the first line of a music-handling
                routine.

   -----------------------------------------------------------------------

      Notes:    {linenum | linelabel} must be defined at the main program
                level.

                With trapping in effect, and when QuickBASIC is executing
                music in the background mode, when the number of notes
                remaining is fewer than queuelimit, QuickBASIC branches to
                the specified subroutine and temporarily suspends trapping
                (by means of an implicit PLAY STOP statement). Trapping
                automatically resumes when a RETURN from the handling
                subroutine is executed (unless the handler explicitly
                performs a PLAY OFF or PLAY STOP).

                All event trapping is temporarily disabled when QuickBASIC
                is executing an error-handling routine (established via an
                ON ERROR statement).

See Also: PLAY (Event Trap)

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