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: a07f3367d7,6fabd104d18f3943 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: conversions between fixed-point types Date: Mon, 28 Sep 2009 14:37:32 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1254163052 18585 192.74.137.71 (28 Sep 2009 18:37:32 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 28 Sep 2009 18:37:32 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:TSs9AdkQnvfwkKPe2AScrbEHvIw= Xref: g2news2.google.com comp.lang.ada:8516 Date: 2009-09-28T14:37:32-04:00 List-Id: Dirk Herrmann writes: > Robert A Duff wrote: >> Dirk Herrmann writes: > As I said when I started this thread, I am currently investigating > whether Ada could be a good replacement for the proprietary fixed-point > oriented language used in our company. And, convincing my colleagues > would certainly not be easier with statements like "Ada can be used, but > you have to implement all fixed-point stuff yourself". Well, yeah, but not "all fixed-point stuff" -- just conversions, when the 'Smalls are incompatible. Does it make sense in your context to avoid "odd-ball" smalls? Note that the default 'Small is a power of 2. >> By the way, you can say: >> for T'Small use T'Delta; >> to avoid repeating yourself. > > I have tried that, especially since the very same recommendation was > given in the Barnes book "Ada 2005". But, GNAT gives an error message. Oops. You're right. It's illegal by the freezing rules. Sorry for the misinformation. - Bob