74 lines
3.1 KiB
HTML
74 lines
3.1 KiB
HTML
<HTML>
|
|
<HEAD><TITLE>QuickBASIC 3.0 - Long Entry</TITLE></HEAD>
|
|
<BODY>
|
|
|
|
<A HREF="ng1f18c.html">[<<Previous Entry]</A>
|
|
<A HREF="ng320.html">[^^Up^^]</A>
|
|
<A HREF="ng1ff42.html">[Next Entry>>]</A>
|
|
<A HREF="menu.html" >[Menu]</A>
|
|
<A HREF="info.html">[About The Guide]</A>
|
|
<HR>
|
|
<PRE>
|
|
<B>ON STRIG(n) Trap for Specified Joystick Button</B>
|
|
|
|
<B>ON</B> <B>STRIG</B>(<U>n</U>) <B>GOSUB</B> {<U>linenum</U> | <U>linelabel</U>}
|
|
|
|
Establishes a subroutine to which QuickBASIC will branch if a
|
|
specified joystick button is pressed. The trap must also be turned on
|
|
by means of a STRIG(<U>n</U>) ON statement.
|
|
|
|
<U>n</U> A numeric expression indicating the button to be trapped.
|
|
Must be 0, 2, 4, or 6. The meaning of <U>n</U> is as follows:
|
|
|
|
0 button A1
|
|
2 button B1
|
|
4 button A2
|
|
6 button B2
|
|
|
|
<U>linenum</U> The first line of the joystick-handling subroutine.
|
|
Setting <U>linenum</U> to 0 disables trapping.
|
|
|
|
<U>linelabel</U> A label identifying the first line of a joystick-handling
|
|
routine.
|
|
|
|
-----------------------------------------------------------------------
|
|
|
|
<B>Notes:</B> {<U>linenum</U> | <U>linelabel</U>} must be defined at the main program
|
|
level.
|
|
|
|
With trapping in effect, QuickBASIC checks to see if the
|
|
specified joystick button has been pressed. When the
|
|
button has been pressed, QuickBASIC branches to the
|
|
specified subroutine and temporarily suspends trapping (by
|
|
means of an implicit STRIG(<U>n</U>) STOP statement). Trapping
|
|
automatically resumes when a RETURN from the handling
|
|
subroutine is executed (unless the handler explicitly
|
|
performs a STRIG(<U>n</U>) OFF or STRIG(<U>n</U>) STOP).
|
|
|
|
Downstrokes that cause joystick button trapping do not set
|
|
functions STRIG(0), STRIG(2), STRIG(4), or STRIG(6).
|
|
|
|
All event trapping is temporarily disabled when QuickBASIC
|
|
is executing an error-handling routine (established via an
|
|
ON ERROR statement).
|
|
|
|
If the "Checking Between Statements" option is in effect,
|
|
QB checks after each statement. If the "Event Trapping"
|
|
option is selected, QB checks after each new program line.
|
|
If neither option is selected, no trapping takes place.
|
|
|
|
For command-line compilation, /v enables checking after
|
|
each statement, and /w enables checking after each new
|
|
line. If neither switch is used, no trapping takes place.
|
|
</PRE>
|
|
<HR>
|
|
<B>See Also:</B>
|
|
<A HREF="ng2f749.html">STRIG (Statement)</A>
|
|
<A HREF="ng2f914.html">STRIG (Function)</A>
|
|
<HR>
|
|
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
|
|
Written by <A HREF="http://www.acemake.com/hagbard">Dave Pearson</A>
|
|
<HR>
|
|
</BODY>
|
|
</HTML>
|