home *** CD-ROM | disk | FTP | other *** search
- { -----------------------------------------------------------------------------
-
- NOTICE:
-
- THESE MATERIALS are UNSUPPORTED by OSS! If you do not understand how to
- use them do not contact OSS for help! We will not teach you how to
- program in Pascal. If you find an error in these materials, feel free
- to SEND US A LETTER explaining the error, and how to fix it.
-
- THE BOTTOM LINE:
-
- Use it, enjoy it, but you are on your own when using these materials!
-
-
- DISCLAIMER:
-
- OSS makes no representations or warranties with respect to the contents
- hereof and specifically disclaim all warranties of merchantability or
- fitness for any particular purpose. This document is subject to change
- without notice.
-
- OSS provides these materials for use with Personal Pascal. Use them in
- any way you wish.
-
- -------------------------------------------------------------------------- }
-
-
- PROGRAM Test_Random;
-
- {***************************************************************************
-
- Program to test random number functions in Personal Pascal.
- October 1, 1986 MJC
-
- Copyright 1986 OSS
-
- >> Compile for TOS!! <<
-
- *****************************************************************************}
-
- VAR
- i : Integer;
- DecRand : Real;
- IntRand : Integer;
-
- {$I RANDOM.PAS} { include random routines }
-
- Begin
- For i := 1 to 100 do
- Begin
- DecRand := Rnd; { grab number tween 0 and 1 }
- IntRand := Random( 5, 10 ); { grab random int between 5 and 10 }
- Writeln( 'DecRand is ', DecRand:10:8, ' IntRand is ', IntRand );
- End;
- End.
-
- { END OF RNDTEST.PAS }
-
-