This are some of my const agreements. It works.
#define Clock (32768*1275) const unsigned int Mem_size[8] = { 32, 320, 3200, 3200, 3200, 3200, 3200, 3200 }; // Delay-time * Clock * 1024 / 10 / Mem_size[0~7] const unsigned int Multiplicator[8] = { 0.0001 * Clock * 1024 / 10 / 32, 0.001 * Clock * 1024 / 10 / 320, 0.01 * Clock * 1024 / 10 / 3200, 0.1 * Clock * 1024 / 10 / 3200, 1.0 * Clock * 1024 / 10 / 3200, 10.0 * Clock * 1024 / 10 / 3200, 100.0 * Clock * 1024 / 10 / 3200, 1000.0 * Clock * 1024 / 10 / 3200 };
But one const can not refer to another const. For example i can not replace the number 3200 by Mem_size[2]. Why not? Is there a work around?
Sincerly yours
In this case, the compiler will do the evaluation, so it will not affect any code size. Even in expressions in executable statements, the compiler will pre-compute constant expressions. This normally happens even if optimization is turned off.