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_onchar()</b> - notify on receipt of character http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_onchar() - notify on receipt of character

   nNote := tp_onchar(nPort, cChar, [cFunction])

   nPort       Serial port number.
   cChar       Character to watch for.
   cFunction   Name of notification function.

   Returns     Notification handle.

   Requests notification when a single character cChar is received on a
   given port.  Up to four tp_onchar() notifications may be posted at
   one time on any port.  (This is in addition to the limit of sixteen
   pending notifications in all.)

   If cFunction is omitted, deletes any posted notification request for
   the specified character on that port.

   Example:

       tp_onchar(1, chr(5), "SendACK")     // On receiving ENQ....

       procedure SendACK
           tp_onchar(1, chr(5), "SendACK")
           tp_send(1, chr(6))
           return

See Also: tp_noteoff() Notifications

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