User Guide
648 Chapter 3: ColdFusion Functions
Rand
Description
Generates a random number.
Returns
A random decimal number, in the range 0 – 1.
Category
Mathematical functions
Function syntax
Rand()
See also
Randomize, RandRange
Usage
To ensure greater randomness, call the Randomize function before calling Rand.
Example
<h3>Rand Example</h3>
<p>Rand() returns a random number in the range 0 to 1.
<p>Rand() returned: <cfoutput>#Rand()#</cfoutput>
<p><A HREF = "rand.cfm">Try again</A>