home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / turbo4 / grexampl.arc / PUTPIX.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-11-17  |  341 b   |  19 lines

  1. uses
  2.   Crt, Graph;
  3. var
  4.   Gd, Gm : integer;
  5.   Color  : word;
  6. begin
  7.   Gd := Detect;
  8.   InitGraph(Gd, Gm, '');
  9.   if GraphResult <> grOk then
  10.     Halt(1);
  11.   Color := GetMaxColor;
  12.   Randomize;
  13.   repeat
  14.     PutPixel(Random(100),Random(100), Color); { Plot "stars" }
  15.     Delay(10);
  16.   until KeyPressed;
  17.   Readln;
  18.   CloseGraph;
  19. end.