July 2000
Intermediate to advanced
492 pages
14h 53m
English
Random —
objTools.Random( )
This method returns a random integer between -32768 and 32767.
<%
' Generate a random integer between 0 and 100 using the Tools Component's
' Random function and the VBScript Mod function.
Dim objTools
Dim intRndm
Set objTools = Server.CreateObject("MSWC.Tools")
intRndm = (objTools.Random( ) Mod 101)
%>
The
VBScript Rnd function is used more often than
the Tools component's Random method, since
Rnd is more flexible.
Read now
Unlock full access