I have a quick questions regarding a a certain style of coding I have seen that I found to be rather unique. It entails including C files within a program to allow for easy changes of constants and other variables on the fly. This method is used because of the ease of finding/changing an automated file(s) that is produced via excel or other programs. I have read that this can create funny complier issues, but I have seen very few issues with the method when in use.
This is used more for embedded programming because it can be tedious to keep track of variables, but could easily be used in other areas. I was just curious as to if this is common, what may be the consequences of something like this, and is there a better way to keep track of data in a program otherwise.
for example:
myFunction()
{
#include "autoGenConstants.c"
//Do work using variables in above c file
}
With such a small example it is hard to see why this would be useful, but in larger projects with many variables and definitions it becomes very helpful.
Thanks for any info.