Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alphabetic numbering system
Message
From
09/01/1999 16:24:57
 
 
To
08/01/1999 12:07:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00174074
Message ID:
00174384
Views:
20
Eric,

This is a portion of some code that I use for a base36 numbering system. You might take a look at this as well. Basicly I "convert" a base10 number to a base36 number where idnum is the base 10 number.


* "Digits" of our base-36
st="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

DO WHILE m.idnum>0
m.ret=SUBSTR(m.st,(m.idnum%36)+1,1)+m.ret
m.idnum=INT(m.idnum/36)
ENDDO
* "Digits" of our base-36
st="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

John

>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform