From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,810843c254562cd8 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 25 Jan 2010 18:35:40 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Embedded systems programmers worldwide earn failing grades in C Date: Tue, 26 Jan 2010 00:38:17 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <3aadd38d-0496-4f61-ba82-d0e1f0c983d2@a32g2000yqm.googlegroups.com> <7roqb2Fas8U1@mid.individual.net> <5pppl5lm5h1eerr6aesru2n9poois8vesc@4ax.com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-g8pw6cd7wF0NM3KxR8F0c5fHwHfl9W6719zLPAxYsqiu7jxISAhF4MAyDo/CpB4TO9qFnGWhmmgN9V5!Y8X1tmG6/uALubaXOrxTrm12dyiEvAHDVUCEJ8X20Ym3sBfhdX3mhmgDUnSOGpmiRaEYr7XF+i4n!A5o= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Xref: g2news1.google.com comp.lang.ada:8823 Date: 2010-01-26T00:38:17+00:00 List-Id: On Mon, 25 Jan 2010 15:22:24 -0800, Keith Thompson wrote: >Brian Drummond writes: >[...] > >A better answer IMHO is: > > Seconds_Per_Year : constant := 60 * 60 * 24 * 365; > >Why specify subtype Natural if you don't need to? Good point; it coerces the solution to be other than Universal Integer sooner than needed. >As I recall, the corresponding C question presented a similar issue. >Ada does have a better solution, but only if you use it. And that's the important point; what level of skill is needed to find the better solution? Clearly more than mine ;-) But then I am, so far, just an Ada dabbler. VHDL would have required some type specifier here; there are many similarities between them; this is not one of them. My feeling is that it's easier to find the right answers with Ada, but a feeling isn't very convincing. - Brian