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_recv()</b> - receive string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_recv() - receive string

   cString := tp_recv(nPort, [nLength], [nTimeout])

   nPort       Serial port number.
   nLength     Number of characters.
   nTimeout    Time to wait, in seconds.

   Returns     String received.

   Reads a string of up to nLength characters from the serial port.

   If nTimeout is specified, waits up to nTimeout seconds to receive
   enough characters to fill the string.  If nTimeout is omitted or
   zero, reads as many characters as are available in the input buffer
   (up to nLength) and returns immediately.  -1 for nTimeout waits
   forever (until the requested length is reached, or tp_idle() returns
   TRUE, or an input error occurs).

   The default value of nLength is the size of the input buffer.

   Example:

       do while tp_error() == 0
           ?? tp_recv(1, 16)
       enddo

See Also: tp_recvto() tp_recvln()

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