Хм, вообщето компилиться нормально. Только как пользоваться не могу понять.
Кароче если не использовать типы, то все работает.
МОДУЛЬ
Unit graph;
Interface
Var i,j,i1,j1,n,m:integer;
p1:array[1..5] of string;
P2:array[1..5,1..5] of string;
Procedure menu(a,n,i1:integer);
Implementation
Procedure menu(a,n,i1:integer);
Begin
Showcanvas;
I1:=1;
Repeat
Setcolor(250,150,50);
Fillrect(0,0,getwidth,getheight);
For i:=1 to n do
If i=i1 then
Begin
Setcolor(20,40,60);
Drawrect(20,20+20*(i-1),50,15);
Setcolor(10,30,50);
Drawtext(p1[i],25,20+20*(i-1));
End;
Else
Begin
Setcolor(50,50,50);
Drawrect(20,20+20*(i-1),50,15);
Setcolor(0,100,200);
Drawtext(p1[i],20,20+20*(i-1));
End;
If keytoaction(getkeypressed)=ga_up then
If i1>1 then I1:=i1-1;
If keytoaction(getkeypressed)=ga_down then
If i1<n then I1:=i1+1;
Delay(40);
Repaint;
Until keytoaction(getkeyclicked)=ga_fire;
End;
End.
Сам код:
program Module;
uses graph;
begin
graph.p1[1]:='aaa';
graph.p1[2]:='bbb';
graph.p1[3]:='ccc';
graph.p1[4]:='ddd';
graph.p1[5]:='eee';
graph.menu(1,5,5);
drawText('Hello world!', 0, 0);
repaint;
delay(2000);
end.