Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>cgetct</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  CGETCT

  .  Summary

  cgetct(int <timeout>);

  .  Description

  The cgetct functions returns a character from the communications
  port, waiting up to <timeout> tenths of a second for it to arrive.
  If a character is already waiting in the communications buffer, it
  is immediately returned. If no character is received within the
  timeout period, a value of -1 is returned.

  The cgetc function returns the first character waiting in the re-
  ceived data communications buffer. If there are no characters in the
  buffer, a value of -1 is returned. The cinp_cnt function may be used
  to see if there are any chars waiting in the buffer.

  .  Return Value

  An integer value as described above.

  .  Example

  if (cinp_cnt())
   chr = cgetc();

  if ((chr = cgetct(100)) == -1)
   prints("Timeout!");

See Also: cinp_cnt cgetc ASCII table

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