Hi folk, I have
u16 wTemp = 0; fsingle fTemp = 17.5123; wTemp = (u16)fTemp;
True that folks, there is no need to talk about programming styles. In general, our team follow some sort of programming style pattern. This is due to programming skill differences among team members. So in general, making the program source code as explicitly as possible so that there is no misunderstanding and in addition, the C compiler will be smart enought to optimize "all" redundency.
"the C compiler will be smart enought to optimize "all" redundency." You'd hope so, wouldn't you? I did once come across a compiler (not 8051; not Keil; someone beginning with 'I') which did produce different results if you used "unnecessary" parentheses! But then their assembler produced the same opcode for both the "Jump If Equal" and "Jump If Not Equal" mnemonics!!