I have this constant:
#define MAX_DATE 2958465L
What does the L mean in this sense?
It is a long
integer literal.
Integer literals have a type of int
by default; the L
suffix gives it a type of long
(Note that if the value cannot be represented by an int
, then the literal will have a type of long
even without the suffix).
In this scenario the L
does nothing.
The L
after a number gives the constant the long
type, but because in this scenario the constant is immediately assigned to an int
variable nothing is changed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With