17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

STRIG Statement and Function<br />

Purpose:<br />

To return the status of the joystick triggers.<br />

Syntax:<br />

As a statement:<br />

STRIG ON<br />

STRIG OFF<br />

As a function:<br />

x=STRIG(n)<br />

Comments:<br />

STRIG ON must be executed before any STRIG(n) function calls may be made. Once STRIG<br />

ON is executed, GW-BASIC will check to see if a button has been pressed before every statement<br />

is executed. STRIG OFF disables the checking.<br />

x is a numeric variable for storing the result.<br />

n is a numeric expression within the range of 0 to 7 that returns the following values:<br />

Value of n Returns<br />

0 -1 if trigger A1 was pressed since the last STRIG(0) statement; returns 0, if not.<br />

1 -1 if trigger A1 is currently pressed; returns 0, if not.<br />

2 -1 if trigger B1 was pressed since the last STRIG(2) statement; returns 0, if not.<br />

3 -1 if trigger B1 is currently pressed; returns 0, if not.<br />

4 -1 if trigger A2 was pressed since the last STRIG(4) statement; returns 0 if not.<br />

5 -1 if trigger A2 is currently pressed; returns 0, if not.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/STRIG.html28/03/2004 21.29.49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!