home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
ozogan
/
KEYBOARD.IPS
< prev
next >
Wrap
Text File
|
1997-07-24
|
1KB
|
48 lines
VAR
z : Word = 0;
s : Char = " ";
ENDVAR
PROCEDURE main
ProgramHide;
ConsoleClear;
CommandHide;
ConsoleShow;
WRITELN('Program pro demonstraci Φtenφ z klßvesnice')
WRITELN('Zapisujte libovolnΘ znaky, kterΘ se po ')
WRITELN('p°eΦtenφ klßvesnice zapφÜφ do v²stupnφho')
WRITELN('textovΘho okna')
WRITELN('******************************************')
WRITELN('*** zaΦßtek cyklu Φtenφ GetKey ***')
WRITELN('*** pro ukonΦenφ stiskn∞te klßvesu ESC ***')
WRITELN('******************************************')
z := 0;
WHILE (z <> 27)
REPEAT UNTIL KeyPressed
z := GetKey;
IF z = 13 WRITELN() ENDIF
IF z > 31 WRITE(chr(z)) ENDIF
WRITELN(' --->',z:4);
ENDWHILE
WRITELN()
WRITELN('********* konec cyklu GetKey ***********')
WRITELN()
WRITELN('******************************************')
WRITELN('*** zaΦßtek cyklu Φtenφ GetChar ***')
WRITELN('*** pro ukonΦenφ stiskn∞te klßvesu ESC ***')
WRITELN('******************************************')
WHILE (ord(s) <> 27)
REPEAT UNTIL KeyPressed
s:=GetChar
IF ord(s) > 31 WRITE(s) ENDIF
IF ord(s) = 13 WRITELN() ENDIF
{ WRITELN(Ord(s):3); }
ENDWHILE
WRITELN('')
WRITELN('********* konec cyklu GetChar **********')
WRITELN('*********** konec programu ************')
ProgramShow;
CommandShow;
ENDPROC