×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Not to dismiss Antonio's comments for what they describe, because
they are of course very relevant for describing the more generalized
issue for the non-decimal digit representation. However, the issue that
was originally being addressed, to /Increment an alpha field by "1"/,
can be viewed as an effective odometer; even being representative of the
more generic combination of decimal and alpha as was clarified later, as
the slightly more complex issue. Simply incrementing one value to its
next, is little different than rolling the numbers on an odometer, which
is a very simple algorithm. That requires nothing more than to mimic
/dials/ of a fixed set of glyphs as digits, for any number position. An
array for each dial is a good data structure to represent the digits as
elements.
From the original posting, there would seem to be no reason to use
any more arithmetic than addition of one [increment by one] and overflow
to zero. The odometer concept can not be much simpler; increment to the
next element, and on to the next dial on overflow. Thus a solution to
the given problem need not be as comprehensive as the more generic
arithmetic proposed; i.e. no conversion to\from decimal would ever be
required to solve the original issue.
Regards, Chuck
David FOXWELL wrote:
A deathly silence seems to have followed this last post in the
thread.
It brought shame on my own solution, and made me realize how
brainwashed I am. Great value for 2 cents!
Antonio wrote:
Folks, IMHO there's a much more straight forward way of dealing with
this kind of math (alpha plus numbers...)
Let's just remember we call our system as "decimal", just because any
number written as ABCDEF means F+E*10+D*100+C*1000+B*10000+A*100000
<<SNIP>>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.