Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another question about Random password Generator
Message
De
28/07/1999 15:16:20
 
 
À
28/07/1999 15:10:11
Greg Mccammon
Raytheon Systems Company
Lexington, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00247351
Message ID:
00247355
Vues:
32
chr(65 + int(rand()*26)) will generate a single random letter from A to Z

Just slap that in where you want an alpha.

replace cvalue with chr(65 + int(rand()*26)) + padl(alltrim(str(1+1000*rand())), 4, "0") + chr(65 + int(rand()*26))

>
>CLOSE DATABASES
>CREATE table Random (cValue N(8))
>FOR nItem = 1 TO 200  && Append 200 records,
>  APPEND BLANK
>  REPLACE cValue WITH 1 + 1000 * RAND( )  && Insert random values
>next
>
>This gets me 200 records in a table consisting of a randomly created number.
>
>How about if I want to create this password using say an alpha character, followed by 4 numerics, then ending with another alpha.
>
>How do you generate the random letters?
>
>Thanks
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform