double in C preprocessor directives -


what differences between,

#define myvariable 1.25 

and,

#define myvariable (double)1.25 

while declaring preprocessor directives in c.

the difference preprocessor will, when sees myvariable, substitute in (double)1.25 rather 1.25.

this have no effect on code (possibly bizarre edge cases notwithstanding) since 1.25 already double literal, per c11 6.4.4.2 floating constants /4:

an unsuffixed floating constant has type double. if suffixed letter f or f, has type float. if suffixed letter l or l, has type long double.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -