Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Randomly chose ms agent characters
Message
 
 
To
28/07/2004 00:26:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00928579
Message ID:
00928650
Views:
22
>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform