You have not fully described the context. The key point in this case is that these variables are declared at the file level and, therefore, have a static storage duration. In C, all objects with a static storage class can be initialized only by constant expressions.
Variables declared with const in C are not constant expressions. Therefore initialization
double X_Curr = X_max, ...
(and only this one) is erroneous.
For this reason, it is preferable to use #define or enum , rather than const to declare named constants in const
The same declaration, but made inside the block, will not lead to such an error, because the requirement of initialization by constants does not apply to it. But it is worth adding the static keyword there, as the error will occur again.
const double X_max = 8701859.625360; double X_Curr = X_max;- Ilya