Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simulating sys(2015)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00185406
Message ID:
00185470
Vues:
34
>>You could use the following, but it only 99,99% unique.
>>
>>cUnique = "_"+STR(INT(RAND()* 99999999 + 100000000),9)
>
>Benn,
>
>Random and Unique are not the same as I found out a few years ago. At a conference there was to be a contest and we used Rand to generate random badge numbers. When the code was run there were repeating values generated.

I know that Random are not the same as Unique. I made a test where I ran the INT(RAND()* 99999999), 10000 times and I got 10000 different values, so that's why I said 99,99% unique.
Benn Kjaer
MS Certified Professional - Visual Foxpro

"There is something rotten in the state of Denmark"
"Why make user-friendly programs, when there aren’t any friendly users :o)"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform