NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
long srand ( long  seed)
inline

Seed the random number generator.

Provide the random number generator with a new seed value.

Parameters
seedThe new random number generator seed. A value of zero causes the seed to be based on the current time value. A value less than zero causes the seed to be restored to the last specified seed.
Returns
The new seed value (useful if you pass in 0 or -1).
Warning
This function requires the enhanced NBC/NXC firmware version 1.31+
Examples:
ex_srand.nxc.