bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
STRIG Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
STRIG returns the status of a joystick trigger.
 
STRIG(n%)
 
Usage Notes
    ■ n% is an integer between 0 and 7 that indicates the joystick and
      trigger to check. The following list describes the values returned
      by the STRIG function for different values of n%:
 
        Argument   Value Returned
        ════════   ════════════════════════════════════════════════════════
        0          -1 if the lower trigger on joystick A was pressed since
                   the last STRIG(0) call, 0 if not.
 
        1          -1 if the lower trigger on joystick A is currently down,
                   0 if not.
 
        2          -1 if the lower trigger on joystick B was pressed since
                   the last STRIG(2) call, 0 if not.
 
        3          -1 if the lower trigger on joystick B is currently down,
                   0 if not.
 
        4          -1 if the upper trigger on joystick A was pressed since
                   the last STRIG(4) call, 0 if not.
 
        5          -1 if the upper trigger on joystick A is currently down,
                   0 if not.
 
        6          -1 if the upper trigger on joystick B was pressed since
                   the last STRIG(6) call, 0 if not.
 
        7          -1 if the upper trigger on joystick B is currently down,
                   0 if not.
 
    ■ See ON STRIG for information on joystick-event trapping. You cannot
      use the STRIG function inside a joystick event trap, because the
      trigger information used by the STRIG function will not be available
      for ON STRIG.
    ■ In previous versions of BASIC, the statement STRIG ON enabled testing
      of the joystick triggers; STRIG OFF disabled joystick trigger testing.
      The current version of BASIC ignores STRIG ON and STRIG OFF
      statements. (The old STRIG ON and STRIG OFF should not be confused
      with the STRIG(n%) ON, STRIG(n%) OFF, and STRIG(n%) STOP statements.
      The STRIG(n%) statements enable, disable, and inhibit trapping of
      joystick events.)