cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, My unsigned char test = 128. If i watch this in my debug consol on cube ide i see -127.

AChar.3
Associate II

My problem is simple 3 week ago i created an uint_8 value = 128 all work fine i can see 128 

2 week ago now i see -127 so i changed my uint8_t to char and everything work i see 128 again

1 week ago i see -127 so i changed again to unsigned char and everything work i see 128 again

but now once again i see -127 when i create an unsigned char = 128. can someone explain to me how that can be possible

Thanks for you'r help .

Alexis.

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

It's not a bug, it's an Eclipse feature.

It shows the correct value when using number format Default, but interpretes it as (signed) integer with number format Decimal.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

It's not a bug, it's an Eclipse feature.

It shows the correct value when using number format Default, but interpretes it as (signed) integer with number format Decimal.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
AChar.3
Associate II

I was a litte bit lost due to the fact that the display changed when i changed from uint8_t to char or unsigned char but yes i m feeling a little silly

Thank you !