Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_random() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_RANDOM()

 DESCRIPTION

 C_RANDOM() generates random numbers of a specified length.  An
 optional seed value can be specified to ensure that the numbers are
 more random.

 SYNTAX

 C_RANDOM([length] [,seed])

 PARAMETERS

 length (N) is the length of the random number that should be
 returned by C_RANDOM() from 1 to 8.  If length is not specified,
 the default of 8 is used.

 seed (N) is a seed number that can be specified to help generate
 more random numbers.  The number should be from 1 to 999.  The seed
 number is stored internally and incremented each time C_RANDOM() is
 called.  If seed is not specified, a default seed value based on
 the computer's clock is used.

 RETURNS

 C_RANDOM() returns a generated random number from 1 to 8 positions
 in length.

 EXAMPLES

 c_random()                         --> 53951728   && default
 c_random(6)                        --> 80795      && limit to 6 numbers
 c_random(4)                        --> 7804
 c_random(4,25)                     --> 6205       && use seed
 c_random(4,val(substr(time(),-2))) --> 2438       && use time() as seed


See Also: C_TMPNAME()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson