Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Monad Research
Message
From
19/01/2009 13:28:51
 
 
To
19/01/2009 13:13:55
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01375100
Message ID:
01375159
Views:
21
>Unless you seed the rand() function by using a negative number, like rand(-1), you will ALWAYS get the same series of values.


If I do:
?rand(1)
?rand()
?rand()
?rand()
I will always get the same values.

But when I do:
?rand(0)
?rand()
?rand()
?rand()
I always get different values.

So what's the difference between rand(-1) and rand(0)?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform