Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get (a-z) or (A-Z) or (0-9) with rand()?
Message
From
22/09/2005 16:57:52
 
 
To
22/09/2005 16:53:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01052187
Message ID:
01052194
Views:
14
>>What do I have to do to have the following results
>>
>>Letter 'a' to letter 'z'
>>or
>>letter 'A' to letter 'A'
>>or
>>digit '0' to digit '9'
>>
>>While using the function RAND()?
>
>You have to use CHR() to get characters
>RAND(-1) && Seed
>?Chr(64+rand()*26) (A-Z)
>?Chr(96+rand()*26) (a-z)
>?RAND()*9 && 0-9 
Thank you Tore.
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Reply
Map
View

Click here to load this message in the networking platform