AT&T 6300 Programmer's Manual page 372

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

ON PLAY(n) GOSUB
Statement
A RETURN from the trapping subroutine
automatically performs a PLAY(n) ON (unless
an explicit PLAY(n) OFF was performed
within the trap routine). The "RETURN
linenum" form may also be used. Use this
form with care, because any other active
GOSUBs, WHILEs, or FORs will remain
active, and errors (such as "FOR without
NEXT") may result.
If PLAY(n) trapping is enabled, and the
background music buffer is empty, no
PLAY(n) trapping routine is executed.
Note:
• A PLAY event trap is only effective when
playing Background Music (PLAY "MB...").
PLAY event traps have no effect when
running in Music Foreground (PLAY "MF...").
• A PLAY event trap is ineffective if the Music
Background buffer is already empty when a
PLAY ON is executed.
• Care should be taken in selecting values for
"n." If "n" is a large number, event traps
occur frequently enough to reduce program
execution speed.
Example
7-216
10 PLAY ON
20 ON PLAY(B) GOSUB 1000
1000 rSUB PLAY(B) TRAP
1050 RETURN

Advertisement

Table of Contents
loading

Table of Contents