Quote:
|
Originally Posted by CronosPrime1
Yes, it is always very important to make sure you declare things with the right type. However, when you write something like 3.142, the computer knows you want a float. In fact, the computer even treats 15.0 as a float. Why else would you have put the decimal point if not to mean that you want a float?
|
Most C languages treat constants with decimal points as double by default - hence the "X.XXf", to specify only a 32 bit FP is needed. I think PIC C uses float by default, but it's habit from my desktop C background. Doesn't hurt.