David
Mon Jun 30 09:25:29 CDT 2003
Finns,
The set of calls to rand() in every VFP session will return the same
sequence of psuedorandom numbers. This is actually a good thing, it allows
repeatability so that you can reliably test code that uses random numbers.
You are seeing different results between your dev time and the runtime
because you've been making calls to rand() all along.
As George posted include a rand(-1) call at the beginning of your prg to
randomize the starting point of the sequence.
--
df - Microsoft MVP FoxPro
http://www.geocities.com/df_foxpro
"finns" <finns@ms1.hinet.net> wrote in message
news:unyCnMuPDHA.2476@TK2MSFTNGP10.phx.gbl...
> I try to pick up some random numbers ...
> so I wrote a procedure ...
>
> it produced differents numbers when i ran it inside the vfp.
> but it didnt when it ran as a .exe file ...
>
> anyone can resolve this??