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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f822ae7b0f7433c1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.hanau.net!newsfeed2.scan-plus.net!newsfeed.ision.net!newsfeed2.easynews.net!ision!citadel.nobulus.com!fi.sn.net!newsfeed1.fi.sn.net!news.song.fi!not-for-mail Date: Fri, 19 Jan 2007 10:32:39 +0200 From: Niklas Holsti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Translating an embedded C algorithm References: <1168871816.263502.212100@11g2000cwr.googlegroups.com> <45acc0c3$0$22514$39db0f71@news.song.fi> <45af9c60$0$22524$39db0f71@news.song.fi> <87y7o01e4y.fsf@ludovic-brenta.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <45b080e8$0$22527$39db0f71@news.song.fi> Organization: TDC Song Internet Services NNTP-Posting-Host: laku61.adsl.netsonic.fi X-Trace: 1169195240 news.song.fi 22527 81.17.205.61:32792 X-Complaints-To: abuse@song.fi Xref: g2news2.google.com comp.lang.ada:8313 Date: 2007-01-19T10:32:39+02:00 List-Id: Cesar Rabak wrote: > Ludovic Brenta escreveu: > >> Niklas Holsti writes: >> [...] >> >> private package Thermometer.Some_Particular_Kind_Of_Sensor is >> type Count_T is range 0 .. 1024; > > The ADC is ten bit, so it should be: "type Count_T is range 0 .. 1023;" > -- 2#11111_11111# In this case, I find the base-2 literal harder to read -- how many 1's are there really? My eyes cross if I try to count them... Perhaps the best form is 2**10 - 1, as in Steve's version of the function. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .