Hi:
I have this function, converting the ASCII value in to a corresponding HEX and then doing a bitshift by 4. It does octal.
iReturnValue = (iReturnValue <<= 4) | ( (cmd % '0') - 7 * (cmd / 'A') );
if I want to change this to convert from to an integer from hexascii what needs to be changed?
iReturnValue = (iReturnValue >>= 4) | ( (cmd % '0') - 7 * (cmd / 'A') );
I thought this above, but it does not seem to work.
Thanks,
Doug
I have this function, converting the ASCII value in to a corresponding HEX and then doing a bitshift by 4. It does octal.
iReturnValue = (iReturnValue <<= 4) | ( (cmd % '0') - 7 * (cmd / 'A') );
if I want to change this to convert from to an integer from hexascii what needs to be changed?
iReturnValue = (iReturnValue >>= 4) | ( (cmd % '0') - 7 * (cmd / 'A') );
I thought this above, but it does not seem to work.
Thanks,
Doug