Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Random Numbers
Message
From
14/07/2000 19:06:27
 
 
To
14/07/2000 18:42:03
Glen Rostant
Cloud 9 Solutions, Inc.
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00392735
Message ID:
00392740
Views:
10
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform