Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Сборник задач Бабалова.doc
Скачиваний:
86
Добавлен:
04.06.2015
Размер:
1.16 Mб
Скачать

1: Begin

gotoxy(2,1);

textbackground(4);

write(' Открыть ');

help_line(' Открыть файл данных');

end;

2: Begin

gotoxy(2,2);

textbackground(4);

write(' Сохранить ');

help_line(' Сохранить в файле ');

end;

end;

case readkey of

#0: case readkey of

#72: if L<1 then inc(L);

#80: if L>2 then dec(L) ;

end;{case}

#13: begin

pop_menu1:=L;

stop:=true;

end;

#27: begin

pop_menu1:=L;

stop:=true;

end;

end;{case}

end;

pop_menu1:=L;

{ textbackground(0);}

window(1,1,80,25);

end;

function pop_menu2:byte;

var

stop:boolean;

L:byte;

I:byte;

begin

stop:=false;

L:=1;

while not stop do

begin

textcolor(15);

textbackground(11);

gotoxy(12,1); write(' Ввод ');

gotoxy(12,2); write(' Показать ');

gotoxy(12,3); write(' Изменить ');

gotoxy(12,4); write(' Очистить ');

textbackground(1);

textcolor(7);

case L of

1: Begin

gotoxy(12,1);

textbackground(4);

write(' Ввод ');

help_line(' Ввод новых разделов');

end;

2: Begin

gotoxy(12,2);

textbackground(4);

write(' Показать ');

help_line(' Просмотреть картотеку ');

end;

3: Begin

gotoxy(12,3);

textbackground(4);

write(' Изменить ');

help_line(' Ввод в пустые разделы');

end;

4: Begin

gotoxy(12,4);

textbackground(4);

write(' Очистить ');

help_line(' Удалить картотеку ');

end;

end;

case readkey of

#0: case readkey of

#72: if L>1 then dec(L) else L:=4;

#80: if L<4 then inc(L) else L:=1;

end;{case}

#13: begin

pop_menu2:=L;

stop:=true;

end;

#27: begin

stop:=true;

pop_menu2:=L;

end;

end;{case}

end;

pop_menu2:=L;

gotoxy(1,3);

textbackground(0);

end;

procedure menu_;