Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Random Numbers
Message
De
14/07/2000 19:06:27
 
 
À
14/07/2000 18:42:03
Glen Rostant
Cloud 9 Solutions, Inc.
Miami, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00392735
Message ID:
00392740
Vues:
9
Here is a function I use to get a 10 character random number that does not exist in my customer table.

DP


DO WHILE .T.
Curnum = RAND()
StrNum = STR(CurNum,12,10)
StrNum = SUBSTR(StrNum,AT(".",StrNum)+1,10)
IF SEEK(StrNum,"Customer")
** Keep trying.
ELSE
EXIT
ENDIF
ENDDO
Live life today - tomorrow will take care of itself.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform