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.
UEVENT Statements Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
The UEVENT statements enable, disable, or suspend a user-defined event.
 
UEVENT ON
UEVENT OFF
UEVENT STOP
 
Usage Notes
    ■ UEVENT ON enables trapping of a user-defined event. A user-defined
      event is usually a hardware interrupt (although it can be a software
      interrupt). If a user-defined event occurs after a UEVENT ON
      statement, the routine specified in the ON UEVENT statement
      is executed.
    ■ UEVENT OFF disables trapping of a user-defined event. No trapping
      takes place until another UEVENT ON statement is executed. Events
      occurring while trapping is off are ignored.
    ■ UEVENT STOP suspends trapping of a user-defined event. No trapping
      takes place until a UEVENT ON statement is executed. Events
      occurring while trapping is suspended are remembered and processed
      when the next UEVENT ON statement is executed. However, remembered
      events are lost if a UEVENT OFF statement is executed.
    ■ When a user-defined trap occurs (that is, the GOSUB is
      performed), an automatic UEVENT STOP is executed so that recursive
      traps cannot take place. The RETURN from the trapping routine
      automatically executes a UEVENT ON statement unless an explicit
      UEVENT OFF was performed inside the routine.
    ■ If your program contains event-handling statements and you are
      compiling from the BC command line, use the BC /W or /V option.
      (The /W option checks for events at every label or line number; the
      /V option checks at every statement.) If you do not use these
      options and your program contains event traps, BASIC generates the
      error message, "ON event without /V or /W on command line."
    ■ For more information, see Chapter 9, "Event Handling" in the
      Programmer's Guide.