Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Monad Research
Message
De
19/01/2009 13:34:40
 
 
À
19/01/2009 13:28:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01375100
Message ID:
01375166
Vues:
11
>>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)?

If you reboot your computer, you will get the same values, AFAIK. Anyway, help suggests to use a negative value.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform