RecTangle (18, y1-3, 253, y2-3);
SetFillStyle (1,lightblue);
Bar (15, y1, 250, y2);
case i of
1: Name: ='Cправка';
2: Name: ='y=a*ln(b*x) ';
3: Name: ='y=a*x^2+b*x+c';
4: Name: ='Построение графика';
5: Name: ='Выход';
end;
SetColor (white);
OutTextXY (45, y1+25, Name);
y1: =20+y2;
y2: =75+y2;
end;
SetColor (white);
p1: =p1-1;
Rectangle (18, 19+75*p1, 246, 66+75*p1);
end;
{***************************************************************************}
procedure help;
var st: string;
f: text;
y: integer;
mistake: byte;
begin
ClearDevice;
Assign (f, 'c: \temp\My_stuff\help. asc');
{$I-}
Reset (f);
{$I+}
mistake: =IOResult; SetTextStyle (0, 0, 0);
If mistake <> 0 then OutTextXY (250, 220, 'Файла не существует') else
begin
y: =0;
Repeat
y: =15+y;
ReadLn (f, st);
OutTextXY (45, y, st);
Until EOf (f);
Close (f);
end;
OutTextXY (400, 450, 'Нажмите "Ввод" для выхода');
ReadLn; pro;
end;
{***************************************************************************}
procedure eat (p2: byte; var bool: boolean);
begin
if p2=1 then help else
if p2=2 then equation_1 else
if p2=3 then equation_2 else
if p2=4 then groffunc else
if p2=5 then bool: =true;
end;
{***************************************************************************}
procedure pro;
var p, code: byte;
k: char;
bool: boolean;
begin
ClearDevice;
p: =1;
key (p);
bool: =false;
repeat
SetBKColor(lightgray);
SetTextStyle (1, 0, 4); SetColor (blue);
OutTextXY (390, 130, 'МЕНЮ');
SetTextStyle (0, 0, 0);
k: =ReadKey;
code: =ord (k);
Case code of
122: begin
p: =p-1; if p=0 then p: =5;
key (p);
end;
120: begin
p: =p+1; if p=6 then p: =1;
key (p);
end;
13: eat (p, bool);
end;
until bool;
CloseGraph;
end;
{***************************************************************************}
begin
title;
number: =0;
graphica;
end.