Seeds the pseudo-random number generator with an
integer number, ensuring repeatable number patterns.
randomize(number [, algorithm])
→ returns numeric
CFMX_COMPAT
CFMX_COMPAT
SHA1PRNG
IBMSecureRandom
The following example calls the Randomize function to seed the random number generator and generates 10 random numbers.
<cfset randomize(12345)> <!--- if one was to remove this line, the random numbers are different every time --->
<cfloop index="i" from="1" to="10">
<cfoutput>#rand()#</cfoutput>
</cfloop>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.