Шпаргалка: Построение циклических кодов
ch:=Readkey;
if(ch=#0)
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