Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Randomly chose ms agent characters
Message
 
 
À
28/07/2004 00:26:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00928579
Message ID:
00928650
Vues:
23
>how can i randomly choose between ms agent characters programmatically in my visual app?

Assuming, that you've lnMax characters, you can put characters names into array or cursor, generate random # betwen 1 and lnMax and than pick the character based on that.
* Issue RAND(-1) to get a seed based on the system clock
RAND(-1)
lnMin = 1
lnMax = 3

...

lnNum = INT((lnMax - lnMin + 1) * RAND( ) + lnMin
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform