13.07.2015 Views

DSP56xxx C Cross-Compiler User's Guide - Tasking

DSP56xxx C Cross-Compiler User's Guide - Tasking

DSP56xxx C Cross-Compiler User's Guide - Tasking

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3–92Chapter 3typedef union{_fract f;int i;} fract_int;fract_int val = 0x123456; // hex initializationint f( void ){val.f = 0.1; // put fractional value 0.1// in val.freturn( val.i ); // return 0xCCCCC as integer} int f( void ){_fract f = 0.1; // put fractional value 0.1// in freturn( *(int*)&f ); // return 0xCCCCC as integer}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!