This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Converting 'short' to 'unsigned char'

Hi,

I've to debug an application written by someone else (...)

An 'unsigned char' is used to be filled with data from a 'short'. If I change the source 'short' variabele type (filled somewhere) into 'unsigned char' then my appplication runs without problems.

I found out that 'short' is a 16-bit variable and I know that 'unsigned char' is a 8-bit variable, but how does conversion take place from 'short' to 'unsigned char' and how is 'short' to be interpreted as signed or unsigned?

All tips are welcome,

Henk

Parents Reply Children
No data