Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_idle()</b> - idle procedure http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_idle() - idle procedure

   lEscape := tp_idle()

   Returns     TRUE to abort the current operation.

   The library calls the tp_idle() function whenever it is waiting for
   input or output during a timeout.  You may replace the library's
   version of this function with one of your own by defining it in your
   program; your version will override the one in the library.

   tp_idle() must return a logical value.  Normally it should return
   FALSE.  If it returns TRUE, whichever function is currently executing
   will return immediately, setting an error code of TE_ESCAPE.

   Because tp_idle() is called from within other functions in the
   library, it is important that it execute quickly.  It should never
   wait for input from the keyboard, perform time-consuming database
   operations, or read or write devices such as the printer, which can
   potentially take a long time to respond.

   Example:

       // Abort any I/O if user hits <Esc>
       function tp_idle
           return inkey() == 27

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson