General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only