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

Initialize a const floating point with an raw binary value

Hello,

is there a way to initialize a floating point constant (code memory) with a raw binary value? Because we use a few special NAN flags and I cant initialize them using the CX51 compilier. With the IAR compilier I used a union and specified if the value should be interpreted as integer or floating point but with the CX51 compilier this is not possible for constant values because the compilier does not support this kind of initialization. It is part of C99 Standard but CX51 is C90. Maybe there is another way to do this.

Best regards