Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric issues
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01507670
Message ID:
01507672
Views:
68
lnNumber = 39932 
? lnNumber % 1000
? IRAND(1,999)


FUNCTION IRAND
LPARAMETERS tnMin, tnMax
RETURN INT((tnMax-tnMin+1) * RAND() + tnMin)
>
>How to get the last 3 digits of a numeric fields, as below:
>
>
>39932 ...................932
>111115454.............454
>
>Or how to generate random numeric values under 1000
>
>939
>221
>014
>
>etc
>
>Moises
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform