Knowledgebase:
MathRnd
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 08 February 2017 12:33 PM

Syntax

Public Function MathRnd(Optional Number As Double) As Single

This function is used to produce random number less than 1 but greater than or equal to zero. 

Parameters

Key Description 
Number An optional numeric value which determines how Rnd method generates a random numbe.

Return value

Value Return Result
Less than zero The same number every time , using number as the seed.
Greater than zero The next random number in the sequence.
Equal to zero The most recently generated number.
Not  supplied The next random number  in the sequence.

Sample

Public Sub main()

' Initialize the random number generator.

Randomize  

AlertMessage MathRnd()*6+1 

  ' The result will be a random value of type double between 1 and 6 

End Sub


See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions