home *** CD-ROM | disk | FTP | other *** search
- {--------------------------------------------------------------}
- { BoxTest2 }
- { }
- { Separate compilation demo program -- USES BOXSTUFF.TPU }
- { }
- { by Jeff Duntemann }
- { Turbo Pascal V5.0 }
- { Last update 7/14/88 }
- { }
- { From: COMPLETE TURBO PASCAL 5.0 by Jeff Duntemann }
- { Scott, Foresman & Co., Inc. 1988 ISBN 0-673-38355-5 }
- {--------------------------------------------------------------}
-
- PROGRAM BoxTest;
-
- USES CRT,BoxStuff;
-
- TYPE
- String80 = String[80];
-
- VAR
- X,Y : Integer;
- Width,Height : Integer;
-
- BEGIN
- Randomize; { Seed the pseudorandom number generator }
- ClrScr; { Clear the entire screen }
- WHILE NOT KeyPressed DO { Draw boxes until a key is pressed }
- BEGIN
- X := Random(72); { Get a Random X/Y for UL Corner of box }
- Y := Random(21);
- REPEAT Width := Random(80-72) UNTIL Width > 1; { Get Random Height & }
- REPEAT Height := Random(25-Y) UNTIL Height > 1; { Width to fit on CRT }
- MakeBox(X,Y,Width,Height,GrafChars); { and draw it! }
- END
- END.