Generates a pseudo-random number in the range 0 - 1.
rand([algorithm])
→ returns numeric
CFMX_COMPAT
CFMX_COMPAT
SHA1PRNG
IBMSecureRandom
To generate a random number between 0 to 1
writeOutput( rand() );
To generate a random number between 0 to 1 by using CFMX_COMPAT algorithm
writeOutput( rand('CFMX_COMPAT') );
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.