Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random Numbers
Message
 
 
À
26/05/1999 16:41:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00223172
Message ID:
00223277
Vues:
26
Jeff,

padl( floor( rand() * 10000 ), 4, "0" ) + '-' + padl( floor( rand() * 100000 ), 5, "0" )

>I need to be able to generate a random number for patient ids. The first three numbers are entered by the user but the remaining 12 should be generated.
>
>Broken down, it's like this:
>
>555 - 1234 - 56789
>
>(555 = SITE NO.)
>(1234 = 4 RANDOM NUMBERS)
>(56789 = 5 RANDOM NUMBERS)
>
>Does anyone know of a painless method in doing this? The only thing that they need to be able to do now is, type in their site no, 2.) Enter Patient's First and last name, 3.) Patient's date of birth, and press the Generate randon id Button.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform