Category : Pascal Source Code
Archive   : PASBGI.ZIP
Filename : RANDOMGR.PAS

 
Output of file : RANDOMGR.PAS contained in archive : PASBGI.ZIP
PROGRAM RandomGraphics;

(* PURPOSE: Demonstrate BGI graphics
* SYSTEM: Turbo Pascal 4.0
* AUTHOR: Tom Swan
*)

USES Crt, Graph;

VAR grDriver, grMode, grError : Integer;


PROCEDURE DoGraphics;

{ Display graphics. }

VAR ch : Char;

BEGIN
REPEAT
SetColor( 1 + Random( GetMaxColor ) ); { Select color }
LineTo( Random( GetMaxX + 1 ), { x coordinate value }
Random( GetMaxY + 1 ) ); { y coordinate value }
UNTIL Keypressed;
ch := Readkey
END; { DoGraphics }


BEGIN
grDriver := Detect;
InitGraph( grDriver, grMode, '' );
grError := GraphResult;
IF grError <> GrOk
THEN Writeln( 'Graphics error : ', GraphErrorMsg( grError ) )
ELSE BEGIN
DoGraphics;
CloseGraph
END
END.


  3 Responses to “Category : Pascal Source Code
Archive   : PASBGI.ZIP
Filename : RANDOMGR.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/