A quick or short way to convert $hex to Decimal
$WMc%
Posts: 1,884
·I'm haven A brain fart!!!
· I'm looking for A quick way to convert "$HEX" to A Decimal #, w/ the BS2p40·????...I know I've done this before,But I can't find were???? ...Tring to avoid All the Math...
Any Idea's ????.
_______________$WMc%___________________________??????
Post Edited ($WMc%) : 11/15/2008 5:32:07 AM GMT
· I'm looking for A quick way to convert "$HEX" to A Decimal #, w/ the BS2p40·????...I know I've done this before,But I can't find were???? ...Tring to avoid All the Math...
Any Idea's ????.
_______________$WMc%___________________________??????
Post Edited ($WMc%) : 11/15/2008 5:32:07 AM GMT
Comments
I Think You for Your Reply;
The Code You wrote Is very clever and I'll send back the results!!!
If your $hex numbers represent ASCII values, such as $30 for the character "0", and so forth, then you may need to do a conversion. Same if you need to go the other way, taking $0A and changing it into $3130 or characters "10".
If, on the other hand, you have $0A, for example, representing the number 10, it's already in the form you require. Decimal 10, hex $0A, binary %00001010, are human-readable ways of writing the very same byte of information, and no conversion is in order. Same for anything else that can possibly be in a byte variable. $FF is the same as decimal 255, for example, and represents just another way of writing it on the screen, or on paper, for humans to read. There isn't anything to convert.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i