Unit 'AmigaDOS' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

WaitForChar

Determine if chars arrive within a time limit

Declaration

Source position: amigados.pas line 1726

function WaitForChar(

  file1: LongInt;

  timeout: LongInt

):LongBool;

Arguments

timeout

  

In miliseconds

Description

If a character is available to be read from file within the time (in microseconds) indicated by timeout, WaitForChar() returns -1 (True). If a character is available, you can use Read() to read it. Note that WaitForChar() is only valid when the I/O stream is connected to a virtual terminal device. If a character is not available within timeout, a 0 (False) is returned.

See also

DosRead

  

Read bytes of data from a file

FGetC

  

Read a character from the specified input (buffered)


Documentation generated on: 2021-07-30