Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is shorter than Sys(2007) ?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01319700
Message ID:
01319848
Views:
15
You're welcome. BTW, the max # is lnBase^n - 1, where n is the size of the rersult string.


>This one does all I want. No need to use PADR() anymore. Very nice. The maximum number it supports is 456975. Thanks Sergey.
>
>>Yes, I see the problem. Try (works even for 0)
>>
>>	lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>>	lcCharList = lcLetters
>>	lnBase = LEN(lcCharList)
>>	lcVal = ""
>>	FOR i=1 TO 4
>>		lnRest = (lnVal % lnBase)
>>		lnVal = INT( lnVal / lnBase)
>>		lcVal =  SUBSTR( lcCharList, lnRest + 1 , 1 ) + lcVal
>>	ENDFOR
>>
>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform