Crt, read and Ctrl-C

Waldek Hebisch hebisch at math.uni.wroc.pl
Sat Dec 3 19:19:02 CET 2005


The following program tries to catch Ctrl-C using crt unit:

program ctrl1;
uses crt;
var c : char;
begin
  crtinit;
  CheckBreak := false;
  read(c);
  writeln('ord(c) = ', ord(c))
end
.

However, when I run it and press Ctrl-C I get:

./a.out: attempt to read past end of Input (error #454 at 40b255)

A bug or a feature?

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 




More information about the Gpc mailing list