Текст модуля

Текст модуля. Unit Tim InterfaceUses Crt,Dos Procedure keys varn integer Procedure table Procedure Enter sandman Procedure menu ImplementationProcedure keys varn integer процедура нажатия клавиши var c char begin if keypressed then begin c readkey if c 0 then c readkey n ord c end end Procedure Enter sandman музыка Const m array 1 6 ofinteger 165,330,392,233,220,330 t array 1 6 ofinteger 1100,600,600,600,1100,600 e array 1 7 ofinteger 165,165,165,165,165,165,170 r array 1 7 ofinteger 600,600,600,600,600,600,1100 w array 1 5 of integer 167,167,167,294,233 q array 1 5 ofinteger 1100,600,600,600,1100 o array 1 9 ofinteger 165,182,165,182,165,196,165,182,165 b array 1 9 ofinteger 600,1100,600,600,600,600,600,600,3000 var a, u,z, x integer i byte begin for a 1 to 4 do begin for i 1 to 6 do begin sound m i delay t i nosound end end for u 1 to 3 do begin for i 1 to 7 do begin sound e i delay r i nosound end end for z 1 to 3 do begin for i 1 to 5 do begin sound w i delay q i nosound end end for i 1 to 9 do begin sound o i delay b i nosound end end Procedure table рисуеттаблицу var w, h integer c1,c2,c3,c4,c7,c5,c6,c8,c9,c10 char begin textbackground blue clrscr textcolor yellow w 1 h 1 c1 chr 218 c2 chr 196 c3 chr 191 c4 chr 179 c5 chr 192 c6 chr 217 c7 chr 195 c8 chr 180 c9 chr 193 c10 chr 194 for h 2 to 25 do begingotoxy w, h write c4 end gotoxy w, h write c5 for w 2 to 79 dobegingotoxy w, h write c2 end gotoxy w, h write c6 for h 24 downto 1 dobegingotoxy w, h write c4 end gotoxy w, h write c3 for w 78 downto 1 dobegingotoxy w, h write c2 end gotoxy w, h write c1 gotoxy 1,20 write c7 for w 2 to 59 dobegingotoxy w,20 write c2 end gotoxy w,1 write c10 for h 2 to 24 dobegingotoxy w, h write chr 179 end gotoxy w,20 write c8 gotoxy 59,25 write c9 gotoxy 62,4 writeln F1-Помошь gotoxy 62,5 writeln F2-Новый gotoxy 62,6 writeln F3-Копировать gotoxy 62,7 writeln F4-Переименовать gotoxy 62,8 writeln F5-Удалить gotoxy 62,9 writeln F6-Просмотреть gotoxy 62,10 writeln F10-Выход end Procedure menu Const NORM 17 цвет невыделеного пункта SEL 70 цвет выделенного пункта N 3 var menu array 1 N of string 12 названияпунктов меню punkt integer номер выделенного пункта ch char введенный символ x, y,i integer координаты первой строкименю Procedure punkt1 begin ClrScr writeln Выполнил студент гр. 2-АС-3Тимофеев Т.П. 2001 г. writeln Курсовая работа-а-а-а-а-а-а-а readln end Procedure punkt2 begin ClrScr writeln Тута вс понятно даже реб нку. readln end Procedure MenuToScr выводменю на экран var i integer begin ClrScr for i 1 to N do begin GoToXY x, y i-1 write menu i end TextAttr SEL GoToXY x, y punkt-1 write menu punkt выделим строку меню TextAttr NORM end begin menu 1 О программе menu 2 Помощь menu 3 Выход punkt 1 x 5 y 5 TextAttr NORM MenuToScr repeat ch ReadKey if ch char 0 then begin ch ReadKey case ch of chr 80 стрелка вниз if punkt lt N thenbegin GoToXY x, y punkt-1 write menu punkt punkt punkt 1 TextAttr SEl GoToXY x, y punkt-1 write menu punkt TextAttr NORM end chr 72 стрелка вверх if punkt gt 1 thenbegin GoToXY x, y punkt-1 write menu punkt punkt punkt-1 TextAttr SEl GoToXY x, y punkt-1 write menu punkt TextAttr NORM end end end else if ch chr 13 then begin нажата клавиша lt Enter gt case punkt of 1 punkt1 2 punkt2 3 i 2 выход end MenuToScr end until i 2 end end.