All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shriramana Sharma <samjnaa@gmail.com>
To: Linux C Programming List <linux-c-programming@vger.kernel.org>
Subject: can't initialize a constant using another constant?
Date: Tue, 26 Feb 2008 20:02:06 +0530	[thread overview]
Message-ID: <47C422E6.8050702@gmail.com> (raw)

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.


             reply	other threads:[~2008-02-26 14:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 14:32 Shriramana Sharma [this message]
2008-02-27  8:09 ` can't initialize a constant using another constant? Kristof Provost
2008-02-27  8:33   ` Kristof Provost
2008-02-27 11:43 ` Glynn Clements
2008-02-27 23:35   ` Shriramana Sharma
2008-02-28  9:52     ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47C422E6.8050702@gmail.com \
    --to=samjnaa@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.