forlang.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Random Number Procedures
                                             Up Contents Index Back
─────Random Number Procedures───────────────────────────────────────────────
 
     Random Number Procedures
 
     The RANDOM subroutine returns a pseudorandom real value
     greater than or equal to zero and less than one. The SEED
     subroutine changes the starting point of the pseudorandom number
     generator.
 
     Syntax: CALL SEED (seedval)
             CALL RANDOM (ranval)
 
     SEED takes a single INTEGER*2 argument. SEED uses this
     value to establish the starting point of the pseudorandom number
     generator. A given seed always produces the same sequence of
     values from RANDOM.
 
     The RANDOM subroutine takes a single REAL*4 argument
     through which the random value is returned.
 
     If a program must have a different pseudorandom sequence each time
     it runs, use the GETTIM procedure to pick a seed value (the
     hundredth-of-a-second parameter is a good choice because it
     changes rapidly).
                                    -♦-