22279Re: Finding gaps in a sequence
- Dec 1, 2011--- In firstname.lastname@example.org, "Eb" <ebbtidalflats@...> wrote:
>Sorry if I misunderstood you but I'll reply just in case in order to save you possible extra work and confusion...
> Hi Flo,
> You have are right in what the hex conversion was supposed to do.
> In the mean time I found my original char to hex clip, which only converted a single digit. I applied the single-digit approach to your problem. While I got it to work, it just raised another problem.
> The alphabet is like a base-26 number set (English aplhabet), after shifting a to zero. Straight conversion to numbers creates gaps, where it rolls to the next digit, i.e. aaz --> aba has a gap of 26!, the value of the next digit, and azz to baa has a gap much larger!
You said aaz to aba has a gap but you correctly noted a=0...z=25.
Therefore, aaz=(0*26^2 + 0*26 + 25)=25 and aba=(0*26^2 + 1*26 + 0)=26 - No gap. Likewise, azz=675 and baa=676. Again, no gap.
Hope this helps, sorry if I misunderstood.
- << Previous post in topic Next post in topic >>