Rand

Description

Returns a random decimal number in the range 0 - 1.

Category

Mathematical functions

Syntax

Rand() 

See also

Randomize, RandRange

Usage

To ensure greater randomness, call Randomize before calling Rand.

Example

<!--- This example shows the use of Rand() --->
<html>
<head>
<title>
Rand Example
</title>
</head>

<body bgcolor = silver>
<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>

</body>
</html>