Solitamente io uso initgraph(<driver>, <modo>, '');
Comunque non capisco perchč aggiungi la unit crt: potresti anche toglierla.
Inoltre anche se riuscissi a compilarlo, anche se usassi la istruzione che ti ha dato a_butta la finestra grafica si chiuderebbe subito grazie a "Closegraph", dovresti quindi fare cosė:
*Aggiungi anche la unit "wincrt" alle altre unit e scrivere "repeat delay(1) until wincrt.keypressed" prima di closegraph, cosė la finestra resterā aperta finchč non viene schiaccato un tasto qualsiasi.
oppure
*invertire readln e closegraph.
program cerchio;
uses graph;
var gd,gm:integer;
x,y,d:word;
begin
gd:=detect;
InitGraph(gd,gm);
if graphresult<>grOK then halt;
x:=5;
y:=10;
d:=20;
Circle (X,Y,d);
readln;
closegraph;
end.
oppure
program cerchio;
uses graph, wincrt;
var gd,gm:integer;
x,y,d:word;
begin
gd:=detect;
InitGraph(gd,gm);
if graphresult<>grOK then halt;
x:=5;
y:=10;
d:=20;
Circle (X,Y,d);
closegraph;
repeat delay(1) until keypressed;
readln;
end.
|