random, srandom
Purpose:
random() generates and srandom()
initializes pseudo random numbers.
random() has no parameters,
the seed parameter of srandom() must be of type integer.
srandom() initializes a new sequence
of pseudo random numbers. A sequence is
repeatable if it is initialized with the same seed value.
Return Values:
random() returns a pseudo random number
in the range of 0 to (231)-1.
srandom() does not return a result.
Example:
input: | resulting output:
|
<let srandom(13); ? random();? " ";? random()>
<let srandom(257);? random();? " ";? random()>
<let srandom(13);? random();? " ";? random()>
|
1358590890 733184381
1256888895 1373592409
1358590890 733184381
|
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
See "Was ist AJAX? "
(in German). In Germany H.E.I. provides Webdesign in Mannheim and
Web Programming (Programmierung).
© 1996-2025 H.E.I. All Rights Reserved.
|