random numbers not random?
- From: david.williams@xxxxxxxxxx (David Williams)
- Date: Wed, 02 Nov 2005 16:44:33 -0600
-> I need some random numbers, but i dont get them.
-> Int(Rnd*6)
-> gives me 4,3,3,1,1,4,0,4,4,4
-> always the same!!
-> how do i get real random numbers?
It sounds like you haven't initialized the RND generator, so it comes
up with the same sequence of numbers every time your program is run.
In most BASICs, you should put the following line at the *beginning* of
your program, so it will be executed just once when the program is run:
RANDOMIZE TIMER
That should fix the problem!
dow
.
- Follow-Ups:
- Re: random numbers not random?
- From: Scott Moore
- Re: random numbers not random?
- Prev by Date: Re: random numbers not random?
- Next by Date: Re: random numbers not random?
- Previous by thread: Re: random numbers not random?
- Next by thread: Re: random numbers not random?
- Index(es):
Relevant Pages
|
Loading