Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Variable view handing floating point types differently than expected
Variable view handing floating point types differently than expected [message #1842124] Wed, 09 June 2021 16:25
Anton Krug is currently offline Anton KrugFriend
Messages: 9
Registered: August 2017
Junior Member
When using hex (bin and octal) formatting on floating-point variables the view doesn't represent the variable in a way I would expect.

Currently, it casts the float to an int and then displays its hex value, so 3.14f will become a 0x3, while I would expect instead its IEEE754 representation which is 0x4048f5c3 like here:

See the attachment where there are C and H files that replicate the issue. And show my current workaround as well. I make a pointer to the float, cast that pointer to an int pointer and then dereference it.

In the screenshot, I invoked the function with 3.14f argument.
Previous Topic:Meson Project Properties: The current displayed page contains invalid values.
Next Topic:How to change CDT builder to CMake in existing project?
Goto Forum:

Current Time: Tue Aug 09 11:24:58 GMT 2022

Powered by FUDForum. Page generated in 0.02140 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top