Циклические коды

then begin

ch1:=Readkey;

case ch1 of

#72 : if(Count>1)

then dec(Count);

#80 : if(Count<MenuTop)

then inc(Count);

end;

end;

end;

until(ch=#13);

GetMainMenuChoice:=Count;

end;

Function GetSubMenuChoice:byte;

var

Count:byte;

i:integer;

ch,ch1:char;

begin

Count:=1;

while KeyPressed do

ch:=Readkey;

repeat

for i:=1 to SubMenuTop do

begin

if(i=Count)then

begin

HighVideo;

TextColor(9);

end

else

begin

LowVideo;

TextColor(1);

end;

GotoXY(26,10+i);

Writeln(SubMenuLine[i]);

CursorOff;

end;

if KeyPressed

then begin

ch:=Readkey;

if(ch=#0)

then begin

ch1:=Readkey;

case ch1 of

#72 : if(Count>1)

then dec(Count);

#80 : if(Count<SubMenuTop)

then inc(Count);

end;

end;

end;

until(ch=#13);

GetSubMenuChoice:=Count;

end;

Procedure About;

begin

TextColor(15);

SetWindow(5,1,75,3,1,'О программе');

TextColor(10);

GotoXY(6,2);

TextColor(10+128);

Write('Токарь Алексей Юрьевич АП-57.Курсовой проект.

“Циклический код” ');

end;

end.


Страница: