IBM Lotus Symphony
|
Initializes the random-number generator.
Randomize [Number]
Number: Any integer value that initializes the random-number generator. If Number is omitted, the generator uses the current value of the system timer.
Sub ExampleRandomize
Dim iVar As Integer, sText As String
Dim iSpectral(10) As Integer
Randomize 2^14-1
For iCount = 1 To 1000
iVar = Int((10 * Rnd) ) REM Range from 0 to 9
iSpectral(iVar) = iSpectral(iVar) +1
Next iCount
sText = " | "
For iCount = 0 To 9
sText = sText & iSpectral(iCount) & " | "
Next iCount
MsgBox sText,0,"Spectral Distribution"
end sub