next up previous contents
Next: Data Input/Output Up: C Programming for Research. Previous: Optimisation and Accuracy   Contents

Macro Definitions

Do not embed double , float or int control varibles directly in software eg:

my_func(array, vectory, 0.0001);
Declare such variable at the top of the C function or file as a macro definition together with a comment explaining how (or at least who) defined the variable.

Do not include complicated macro definitions in software which is still to be debugged as debuggers cannot expand macro's in order to show you where the problem lies.

root 2019-05-22