I’m working with very large integer literal defines eg:
#define X 999999999999
To improve readability I tried changing this to:
#define X 999/**/999/**/999/**/999
But the compiler was like “nah bru..”
Is there any way to make these more readable?
Just to clarify, this question is asking only about the appearance of the values in the source code. I’m not asking how to format these values in a printf or anything.
You can do this in a define (but not outside of a define):
I’m not sure that I’d recommend it, but it’s legal. (
##is the preprocessor token concatenation operator.)You explicitly didn’t ask about output formatting, so you’re probably not interested in input formatting either, but both of them can be made locale-aware, which includes allowing locale-specific grouping characters.