Pregunta

I am confused about the words:

Pre-processor directive.

#include <stdio.h>

int main(void)

{

puts("It's me, your first program.");

return 0;

}

When the preprocessor meets that directive, it replaces the directive with the content of the file whose name is listed in the directive (in our case, this is the file named stdio.h).

Shouldn't some proper name been given to the terminology than directive - because directive seems to me that it directs the file rather than replaces it.

¿Fue útil?

Solución

There are other preprocessor directives, for example:

 #define MAXLEN 256

The word "directive" here means the source code line is directing the C preprocessor to do something.

And, as for understanding the Byzantine layers of jargon complexity in a widely adopted language that's well over a generation old, well, everybody struggles with that.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top