ctypesconstantspicmplab-c18

C18: Representation of LONG and FLOAT constants in code


Is a special representation needed for long and float numbers in the code?

In computer programming with C/C++ we put an f letter after a float typed constant number to distinguish it from double type. In C18 language, should/must we do the same thing?

float   fPi = 3.14f;  // Do we put this "f" in C18 language?
double dbPi = 3.14;

What about the long type?

int  iMyInt  = 32767;
long lMyLong = 32768?;  // Do we use any marking for long-type?

Solution

  • mcc18 does a few things slightly different from the ANSI standard:

    For both of these points and more info see the User's Guide .