Language:
Русский
English
{Grfermsg.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the GraphErrorMsg function.}
uses Graph;
var
GraphDriver, GraphMode: Integer;
ErrorCode: Integer;
begin
GraphDriver := Detect;
InitGraph(GraphDriver, GraphMode, '');
ErrorCode := GraphResult;
if ErrorCode <> grOk then
begin
Writeln('Graphics error: ', GraphErrorMsg(ErrorCode));
Readln;
Halt(1);
end;
Line(0, 0, GetMaxX, GetMaxY);
Readln;
CloseGraph;
end.