Uses Crt Graph Var grDriver grMode ErrCode Integer Begin grDriver Dete

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Uses Crt, Graph;
Var
grDriver, grMode, ErrCode : Integer;
Begin
grDriver := Detect;
InitGraph(grDriver, grMode,' ');
ErrCode := GraphResult;
if ErrCode <> grOk then begin
clrscr;
writeln('Graphics error:', GraphErrorMsg(ErrCode));
readkey;
Exit; {halt(1);}
end;
cleardevice;
line(0,0,639,479);
readkey;
CloseGraph;
End.