Logo

Programming-Idioms

History of Idiom 69 > diff from v6 to v7

Edit summary for version 7 by :

Version 6

2015-07-28, 22:35:15

Version 7

2015-07-31, 19:54:31

Idiom #69 Seed random generator

Use seed s to initialize a random generator.

If s is constant, the generator output will be the same each time the program runs. If s is based on the current value of the system clock, the generator output will be different each time.

Idiom #69 Seed random generator

Use seed s to initialize a random generator.

If s is constant, the generator output will be the same each time the program runs. If s is based on the current value of the system clock, the generator output will be different each time.

Code
srand($s);