home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:4026 comp.unix.questions:9606
- Path: sparky!uunet!auspex-gw!guy
- From: guy@Auspex.COM (Guy Harris)
- Newsgroups: comp.unix.programmer,comp.unix.questions
- Subject: Re: Need (today's date - 2 WORKING days) [was: Need (today's date + [1-7]]
- Message-ID: <13837@auspex-gw.auspex.com>
- Date: 30 Jul 92 21:38:23 GMT
- References: <1992Jul28.072025.13886@cssc-syd.tansu.com.au> <1992Jul29.031546.26997@bnd2.bnd.oz.au> <Bs7E0r.Gpq@cck.coventry.ac.uk>
- Sender: news@auspex-gw.auspex.com
- Followup-To: comp.unix.programmer
- Organization: Auspex Systems, Santa Clara
- Lines: 16
- Nntp-Posting-Host: bootme.auspex.com
-
- >>> #define ONE_DAY ((60) * (60) * (24))
- >
- >Call me stupid, but I thought the number of seconds in a day was constant.
- >
- > #define ONE_DAY 86400
-
- Yes, it *is* a constant, but one might want to have the C compiler
- calculate the value of that constant, rather than calculating it oneself
- and
-
- #define ONE_DAY ((60) * (60) * (24))
-
- is a fine way of doing that.
-
- If the compiler doesn't calculate that at compile time, but generates
- code to do the multiplication at run time, then *it's* stupid.
-