If I have:
#define MAXLINE 5000
What type is MAXLINE understood to be? Should I assume it is an int
? Can I test it somehow?
It has no type. It's just a token which the preprocessor will put into the source code before passing the code to the compiler. You can do this (ridiculous) thing to declare a variable called x5000
:
#define APPEND(x,y) x ## y
int main() {
int APPEND(x,5000);
x5000 = 3;
}
The preprocessor turns that into this before passing it the compiler proper:
int main() {
int x5000;
x5000 = 3;
}
So, just because you see 5000
in a macro, it doesn't mean it needs to be numeric in any way.