Hi all,
since I had to deal with rather complex arithmetics hidden in nested defines I have written a wee macro which I would like to share with you.
The #defines I had to deal with look like this:
#define AVAILABLE_ROM_SIZE (200 * 1024)
#define MODULE_A_ROM_SIZE 0x200
#define MODULE_B_ROM_SIZE 1234
#define MODULES_ROM_SIZE (MODULE_A_ROM_SIZE + MODULE_B_ROM_SIZE)
#define REMAINING_ROM (AVAILABLE_ROM_SIZE - MODULES_ROM_SIZE)
I have bound the function Eval_C_Define which is part of the attached file 'cmacrotools.e' to key [Ctrl]+[?]. If you place the cusor on such a define and press [Ctrl]+[?] you get a message box showing the result value.

Have fun,
Gary