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_sendsub()</b> - send part of string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_sendsub() - send part of string

   nSent := tp_sendsub(nPort, cString, nStart, [nLength], [nTimeout])

   nPort       Serial port number.
   cString     String to send.
   nStart      Starting position in string.
   nLength     Number of characters to send.
   nTimeout    Maximum wait time, in seconds.

   Returns     Number of characters sent.

   Sends part of a string to the serial port.  This is equivalent to:

       tp_send(nPort, substr(cString, nStart, nLength), nTimeout)

   tp_sendsub() is faster and does not cause as much memory
   fragmentation.

   Example:

       cCommand := "ATZ" + chr(13) + chr(10)
       for i := 1 to len(cCommand)
           tp_sendsub(1, cCommand, i, 1)
           tp_delay(0.05)
       next

See Also: tp_send()

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