ex34.pp 486 B

12345678910111213141516171819202122
  1. Program Example33;
  2. { Program to demonstrate the SelectText function. }
  3. Uses linux;
  4. Var tv : TimeVal;
  5. begin
  6. Writeln ('Press the <ENTER> to continue the program.');
  7. { Wait until File descriptor 0 (=Input) changes }
  8. SelectText (Input,nil);
  9. { Get rid of <ENTER> in buffer }
  10. readln;
  11. Writeln ('Press <ENTER> key in less than 2 seconds...');
  12. tv.sec:=2;
  13. tv.usec:=0;
  14. if SelectText (Input,@tv)>0 then
  15. Writeln ('Thank you !')
  16. else
  17. Writeln ('Too late !');
  18. end.