Rnd Function

Abs Function,Array Function,Asc Function,Atn Function,CBool Function,CByte Function,CCur Function,CDate Function,CDbl Function,Chr Function,CInt Function,CLng Function,Cos Function,CreateObject Function,CSng Function,CStr Function,Date Function,DateAdd Function,DateDiff Function,DatePart Function,DateSerial Function,DateValue Function,Day Function,Eval Function,Exp Function,Filter Function,Fix Function,FormatCurrency Function,FormatDateTime Function,FormatNumber Function,FormatPercent Function,GetLocale Function,GetObject Function,GetRef Function,Hex Function,Hour Function,InputBox Function,InStr Function,InStrRev Function,Int Function,IsArray Function,IsDate Function,IsEmpty Function,IsNull Function,IsNumeric Function,IsObject Function,Join Function,LBound Function,LCase Function,Left Function,Len Function,LoadPicture Function,Log Function,LTrim Function,Mid Function,Minute Function,Month Function,MonthName Function,MsgBox Function,Now Function,Oct Function,Replace Function,RGB Function,Right Function,Rnd Function,Round Function,RTrim Function,ScriptEngine Function,ScriptEngineBuildVersion Function,ScriptEngineMajorVersion Function,ScriptEngineMinorVersion Function,Second Function,Sgn Function,Sin Function,Space Function,Split Function,Sqr Function,StrComp Function,String Function,StrReverse Function,Tan Function,Time Function,Timer Function,TimeSerial Function,TimeValue Function,Trim Function,TypeName Function,UBound Function,UCase Function,VarType Function,Weekday Function,WeekdayName Function,Year Function Home home | Other Resources other resources | Advertise with us advertise | Link to us link to us | Contact us contact | Bookmark Us!
Google
 
Where can I find good Windows Web Hosting to host my VBScript Site?
You can find good Windows Hosting which support VBScript, ASP, ASP.Net,VisualStudio.Net and MSSQL at a very reasonable low monthly fee at EasyCGI.com and DiscountASP.Net

Rnd Function

Returns a random number.

Rnd[(number)]

The number argument can be any valid numeric expression.

Remarks

The Rnd function returns a value less than 1 but greater than or equal to 0. The value of number determines how Rnd generates a random number:

If number isRnd generates
Less than zeroThe same number every time, using number as the seed.
Greater than zeroThe next random number in the sequence.
Equal to zeroThe most recently generated number.
Not suppliedThe next random number in the sequence.

For any given initial seed, the same number sequence is generated because each successive call to the Rnd function uses the previous number as a seed for the next number in the sequence.

Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator with a seed based on the system timer.

To produce random integers in a given range, use this formula:

Int((upperbound - lowerbound + 1) * Rnd + lowerbound)

Here, upperbound is the highest number in the range, and lowerbound is the lowest number in the range.

Note   To repeat sequences of random numbers, call Rnd with a negative argument immediately before using Randomize with a numeric argument. Using Randomize with the same value for number does not repeat the previous sequence.


VBScriptOnline.com - Abs Function,Array Function,Asc Function,Atn Function,CBool Function,CByte Function,CCur Function,CDate Function,CDbl Function,Chr Function,CInt Function,CLng Function,Cos Function,CreateObject Function,CSng Function,CStr Function,Date Function,DateAdd Function,DateDiff Function,DatePart Function,DateSerial Function,DateValue Function,Day Function,Eval Function,Exp Function,Filter Function,Fix Function,FormatCurrency Function,FormatDateTime Function,FormatNumber Function,FormatPercent Function,GetLocale Function,GetObject Function,GetRef Function,Hex Function,Hour Function,InputBox Function,InStr Function,InStrRev Function,Int Function,IsArray Function,IsDate Function,IsEmpty Function,IsNull Function,IsNumeric Function,IsObject Function,Join Function,LBound Function,LCase Function,Left Function,Len Function,LoadPicture Function,Log Function,LTrim Function,Mid Function,Minute Function,Month Function,MonthName Function,MsgBox Function,Now Function,Oct Function,Replace Function,RGB Function,Right Function,Rnd Function,Round Function,RTrim Function,ScriptEngine Function,ScriptEngineBuildVersion Function,ScriptEngineMajorVersion Function,ScriptEngineMinorVersion Function,Second Function,Sgn Function,Sin Function,Space Function,Split Function,Sqr Function,StrComp Function,String Function,StrReverse Function,Tan Function,Time Function,Timer Function,TimeSerial Function,TimeValue Function,Trim Function,TypeName Function,UBound Function,UCase Function,VarType Function,Weekday Function,WeekdayName Function,Year Function