Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alphabetic numbering system
Message
De
08/01/1999 12:37:30
 
 
À
08/01/1999 12:36:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00174074
Message ID:
00174087
Vues:
30
>>>I am faced with the need to create (actually participate with) an alphabetic numbering system. The sequence is straight forward, and looks like this:
>>>
>>>AAAA
>>>AAAB
>>>.
>>>.
>>>AAAZ
>>>AABA
>>>
>>>etc.
>>>
>>>Really my only need is to be able to increment these codes by one, so I need a function that receives "DPRZ" and returns "DPSA". Get it?
>>>
>>>I am fairly confident that I can pound out the code to do this, but all of my ideas so far would take an enormous amount of code- can anybody think of a practical solution?
>>
>>
>>FOR n1=65 to 90
>>	FOR n2=65 to 90
>>		FOR n3=65 to 90
>>			FOR n4=65 to 90
>>				cString=CHR(n1)+CHR(n2)+CHR(n3)+CHR(n4)
>>			ENDFOR
>>		ENDFOR
>>	ENDFOR
>>ENDFOR
>>
>
>This will indeed work to produce an initial list, but I don't want to store a list. I need to pass a parameter and receive a parameter that is one greater than the initial value. Your post has me thinking along different lines though...
>
>PROCEDURE Increment

woops, didn't finish...

PROCEDURE Increment
LPARA tcStartCode

* Magical Processing goes here

RETURN lcStartCodePlusOne
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform