ascii.pas
Petr "Zweistein" Prokop
{ zwei.stein@worldonline.cz, zweistein.kgb.cz }
program Asici;
{
(c) Petr "Zweistein" Prokop
Program ascii :
Pýevody znak… sady ascii
}
uses crt;
var i:char;
label 1;
procedure play;
begin;
sound(100);
delay(200);
nosound;
end;
procedure znakcis;
var zn:char;
begin;
writeln ('Znak ? :');
play;
repeat
zn:=readkey;
until not(zn='');
writeln ('Znak : "',zn,'" - ¬ˇslo ',ord(zn));
End;
procedure cisznak;
var ci:byte;
begin;
write ('¬ˇslo ? :');
play;
readln(ci);
writeln ('¬ˇslo : ',ci,' - Znak "',chr(ci),'"');
end;
begin;
writeln (' Asici - program na zobrazenˇ hodnot znak… nebo naopak');
1:
writeln ('Volba ? :');
writeln (' 0 - Konec');
writeln (' 1 - Znak na źˇslo');
writeln (' 2 - ¬ˇslo na Znak');
write ('?: ');
play;
repeat;
i:=readkey;
until (i='0') or (i='1') or (i='2');
case i of
'0':begin;writeln ('KONEC');halt;end;
'1':Znakcis;
'2':cisznak;
end;
goto 1;
end.