Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#os4units]

WaitForChar

Determine if chars arrive within a time limit

Declaration

Source position: amigados.pas line 2459

function WaitForChar(

  File_: LongInt;

  TimeOut: LongInt

):LongBool;

Arguments

File_

  

BCPL pointer to a file handle

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