I have a C program that has constants and variables defined in it:
#define MAXBUFFERSIZE 500 // maximum length of statement
char statement[MAXBUFFERSIZE]; // database statement
Then I also have a configuration file with some calculation-specific variables:
# Resolution for cohorts; 100 is 1%, 200 is 0.5% etc
RESOLUTION = 200
The configuration parser header file will treat this as follows, where 'RESOLUTION' is read in and continues with 'resolution':
if (!strcmp(metric, "RESOLUTION")) resolution = strtof(value, NULL);
So a naming convention is followed: UPPERCASE for constants and configuration options and lowercase for variables. However, for debugging purposes I prefer to have a naming convention that tells me that 'resolution' actually originates from the configuration option and not originally a compiled variable.
I am not using a full-fledged IDE, just a regular text editor.
What would be a best-practice naming convention for the variables coming from the configuration file? Title Case, underscore-appended_, _underscore-prefixed?