Program Example33; { Program to demonstrate the Select function. } Uses BaseUnix; Var FDS : sigset_t; begin fpsigemptyset (FDS); fpsigaddset (FDS,0); Writeln ('Press the to continue the program.'); { Wait until File descriptor 0 (=Input) changes } fpSelect (1,@FDS,nil,nil,nil); { Get rid of in buffer } readln; Writeln ('Press key in less than 2 seconds...'); fpsigemptyset (FDS); fpsigaddset (FDS,0); if fpSelect (1,@FDS,nil,nil,2000)>0 then Writeln ('Thank you !') { FD_ISSET(0,FDS) would be true here. } else Writeln ('Too late !'); end.