Program klavesy; {ASCII-hodnota stlacenej klávesy}
uses Crt;
var C : Char;
A : Byte;
begin
writeln('Stlac neaky klaves - zobrazim jeho ASCII hodnotu');
repeat
C := Readkey;
writeln('Stlacil si:',C);
{if C = #0 then C := Readkey;}
A := Ord(C);
Writeln( C, ' ASCII hodnota je ', A, '.');
REPEAT UNTIL KEYPRESSED;
until A = 27; {Koniec na stlacenie klavesy ESC - ASCII-hodnota je 27}
readln;
end.