can't initialize a constant using another constant?

Shriramana Sharma <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
Dear list,

Quite some time since I wrote. I hope you are all keeping well. :)

A strange thing I ran across this evening. I was not allowed to do:

const double lunarSynodicMonth = 29.53059 ;
const double daysLunarPhaseAngleTakesPerDegree = lunarSynodicMonth / 360.0 ;

I got the following error:

wdf-karanas.c:17: error: initializer element is not constant
make: *** [wdf-karanas.o] Error 1

I would be grateful if anyone could shed some light. TIA.

Shriramana Sharma.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.