Register
RemedyBG»Forums»Watch window can't display certain integral values when casted.
Lorenzo
8 posts
Watch window can't display certain integral values when casted.
5 months ago Edited by Lorenzo on June 15, 2019, 1:17 p.m. Reason: Initial post
In this snippet of code:
1
 for(u8 i = 33; i < 127; i++) { ... } 

The iterator is going through all printable classical ASCII characters.

If i try to look at the character currently used in the watch window I'll have to cast the variable to char. Doing so produces the error in the Value column. Casting from the pointer type works correctly.

1
2
3
(char)i    -> Expected integral or floating point type
(char*)&i  -> 0x000000040B054F670 "!"
*(char*)&i -> !
144 posts / 1 project

None

Watch window can't display certain integral values when casted.
5 months ago
Lowy
In this snippet of code:
1
 for(u8 i = 33; i < 127; i++) { ... } 

The iterator is going through all printable classical ASCII characters.

If i try to look at the character currently used in the watch window I'll have to cast the variable to char. Doing so produces the error in the Value column. Casting from the pointer type works correctly.

1
2
3
(char)i    -> Expected integral or floating point type
(char*)&i  -> 0x000000040B054F670 "!"
*(char*)&i -> !


I've updated the open Github Issue with your example. Thanks for the additional information.