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>waitfor</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WAITFOR

  .  Summary

  waitfor(str <waitstr>, int <timeout>);

  .  Description

  The waitfor function is used to wait for the given string to come in
  over the serial port. Timeout is the maximum amount of time, in sec-
  onds, to wait for the string. Case is not significant, and the
  string must be no longer than 40 characters.

  .  Return Value

  A non-zero (TRUE) value is returned if the string is received from
  the serial port in the given time, otherwise a zero (FALSE) value is
  returned.

  .  Example

  if (waitfor("name?", 1800))
   prints("The string 'name?' came in from the comm port.");
  else
   {
    prints("The string 'name?' did not come in from the");
    prints("comm port in 3 minutes!");
   }


See Also: track

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