{ CODE2.PAS } { Program po stlaceni lubovolneho klavesu napise jeho kodovu } { hodnotu v tabulke ASCII. } { } { Author: Andrew DiE } { Datum: 18.08.2005 http://www.trsek.com } program ASCII_code; uses crt; var Z,X:char; procedure default; begin textbackground(Black);textcolor(White); end; procedure HELP_roh; begin gotoxy(74,1); textbackground(LightGray); textcolor(Red);write('F1'); textcolor(Black);writeln(' Help'); end; Begin clrscr; textcolor(White); write('Program sa spusta'); delay(500); write('.'); delay(400); write('.'); delay(400); write('.'); delay(400); writeln(' OK'); HELP_roh;default; repeat Z:=readkey; X:=z; textcolor(LightBlue); write('"',Z,'"'); textcolor(White); write('=>'); textcolor(LightRed); write(ord(Z),' '); if X=#0 then if readkey=#59 then begin clrscr; textcolor(white); writeln('HELP : Program napise kod znaku na klávesnici, program ukoncís stlacením ESC'); delay(3000); clrscr; write('Program bezi'); HELP_roh;default; end; until Z=#27; clrscr; textcolor(White); write('Program sa vypína'); delay(400);write('.'); delay(400);write('.'); delay(400);write('.'); End.