Rnd: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 34: | Line 34: | ||
== Related Items == | == Related Items == | ||
[[randomize| | [[randomize|Randomize]] | ||
[[Category:Language Reference]] | [[Category:Language Reference]] |
Revision as of 01:35, 24 August 2012
Rnd
Description
Rnd returns a single-precision number from a random sequence between 0 and 1. The value is always random: no seed needs to be supplied.
Example
Rem Rnd Example 'Rnd generates random numbers Random Random Random Sub Random Dim Ret, i Ret = "" For i = 1 TO 4 Ret = Ret&(Int(100 * Rnd) +1) & " " Next Print "Four random numbers:", Ret End Sub
Output
Four random numbers:6 71 1 19 Four random numbers:33 28 4 51 Four random numbers:33 28 4 51