Quote:
|
Originally Posted by Orborde
Another idea I just had:
Most of us here know very well how the IFI compiler doesn't promote calculations to INT automatically and how many bugs it has caused. Would it be better to simply throw the "always convert to INT" flag in the build options at the outset and not think about the problem any more?
|
To clarify, the compiler is in no way associated with IFI. The only ifi-written component in the software writing process is the IFI bootloader.
The Microchip Compiler for 18F series parts (MCC18), works very close to the hardware and isnt like the average compiler you run in to for targeting JRE/windows/linux/unix operating systems. There is no flag to 'always convert to int' BUT you could write a compiler macro to always typecast all your calculations into the 2byte (integer) format.
Just be advised that this will waste memory, and unless the variables are unsigned will make bit shift division difficult.
PM me if you have any questions.
-Q
EDIT: The post i replied to is no longer in this thread. I realize this post is now off topic.