Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RAND() not very random
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01155607
Message ID:
01157483
Views:
22
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." :^)
Previous
Reply
Map
View

Click here to load this message in the networking platform