VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Randomize

Tom Rezek  (1 Submission)   Miscellaneous   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Ensure that the random number generator is seeded properly.

Assumes
Using the VB statement "Randomize" by itself to seed the random number generator implicitly means "Randomize Timer", with the timer function returning the number of seconds that have elapsed since 12:00 A.M. (midnight). If a program is started at roughly, or worse, launched at the same time each day, the timer could return the same seed each day. To avoid this problem, use a seed based on the date and time.

API Declarations
none

Rate Randomize (2(2 Vote))
Randomize.bas

Randomize Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters