On Wed, 15 Oct 2003 13:59:44 +0930, George Patterson wrote:
>  Hi all,
>  
>  I am using the delay function to pause for an amount of time which works
>  but will not allow the user to stop the program from the console, using
>  ctrl-C. If I could trap the keystroke, I would be happy.
>  
>  Excuse the indentation...
>  
>  while not eof(sin) do
>      begin
>          repeat
>             readln (sin, line);
>          writeln (line);
>          //readln(input_text);
>          delay(250); //time is measured in milliseconds
>          input_text:='hello';
>          writeln(sout,input_text);
>       until keypressed;
       if ReadKey = [CTRL-C] then ...
>      end;
>  close (sin);
  
Untested and somewhat wrong syntax, but if I understand your question
correctly, ReadKey should be what you are looking for.

-- 
Vennlig hilsen / Best regards
Arne Hanssen

_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to