[fpc-devel] Efficient way to inc loop over hexadecimal values

Dominique Leducq dleducq at magellan-ing.fr
Wed Nov 22 11:43:29 CET 2006


ik a écrit :
> Hi List,
> 
> I have two cardinal numbers that represent ranges.
> 
> The 10 base value of that two variables are useless and far from
> having any meaning for my needs.However the hexa number does have
> meaning after I'm changing the network order (aka big endian).
> 
> I can think on many non efficient ways to while loop with inc but not
> even one way to inc it in an efficient way.
> 
> So, I'm looking for an efficient way to loop from left range to right
> range when the values are in Hexa-decimal.
> 
> Thank you for any help on this matter,
> 
> Ido

I'm afraid I don't understand your problem. Decimal or hexadecimal are 
string representation formats, cardinal and integer values are stored 
and dealt with internally in binary form !
If your values are hexadecimal number stored in strings, why not convert 
them first to Cardinal ?

Could you perhaps give an example or be more precise ?





More information about the fpc-devel mailing list