Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need suggestions for not so random number
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01084023
Message ID:
01084115
Vues:
18
>
>Dmitry,
>
>I think Sergey's link is the best for what you are looking for, but, to answer (I hope!) your question, if you call Rand(382622) it will always return the same number, furthermore, all subsequent calls to rand() will follow the same pattern, for example:
>
>
>? rand(382622) && 0.74
>? rand() && .66
>? rand() && .46
>? rand() && .21
>? rand(382622) && 0.74
>? rand() && .66
>? rand() && .46
>? rand() && .21
>
>
>And this will have the same values in any machine, AFAIK

Hugo,

Thank you for your suggestion. The fact that the rand(nseed) returns the same number is the problem for me, since I have to show this "returned number" to the user.

I am working on how to use the method suggested by Sergey and developed by Craig. It looks, so far, very good. My only concern is that if 6 months later Craig finds a bug in his code (and obviously I won't know about it) I can be potentially stuck with a big problem.

Again, thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform