tw1228.pp 443 B

123456789101112131415161718192021
  1. { %INTERACTIVE }
  2. { Source provided for Free Pascal Bug Report 1228 }
  3. { Submitted by "Rich Pasco" on 2000-11-10 }
  4. { e-mail: [email protected] }
  5. uses
  6. CRT;
  7. var
  8. k: char;
  9. begin
  10. WriteLn('Type a few words. Hit Enter to quit:');
  11. repeat
  12. delay(400);
  13. k := ReadKey;
  14. if k=#0 then Readkey (* discard second half of function keys *)
  15. else write(K) (* but echo ASCII to screen *)
  16. until k=#$0D; (* terminate with ENTER key *)
  17. end.