Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RAND() not very random
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01155607
Message ID:
01157483
Vues:
23
Hey Ken,

>An interisting tidbit from http://fox.wikis.com/wc.dll?Wiki~HelloWorld~VFP
>demonstrates how random it is.
>
>? CHR(INT(RAND(37769.1)*26+65))+;
> CHR(INT(RAND()*26+65))+;
> CHR(INT(RAND()*26+65))+;
> CHR(INT(RAND()*26+65))+;
> CHR(INT(RAND()*26+65))+;
> " "+ ;
> CHR(INT(RAND(1612256)*26+65))+ ;
> CHR(INT(RAND()*26+65))+ ;
> CHR(INT(RAND()*26+65))+ ;
> CHR(INT(RAND()*26+65))+ ;
> CHR(INT(RAND()*26+65))

Kewl. Thanks for the link. Going to start a new "random" project
with this code and check it out.

Regards,

Randall
--
Randall Jouett
Amateur/Ham Radio: AB5NI
I eat spaghetti code out of a bit bucket while sitting at a hash table! Someone
asked me if I needed salt, and I said, "I'm not into encryption." :^)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform