Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is shorter than Sys(2007) ?
Message
 
 
À
27/05/2008 19:07:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01319700
Message ID:
01319848
Vues:
16
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform