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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8d7393f07c06c5e9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!i13g2000yqe.googlegroups.com!not-for-mail From: Phil Thornley Newsgroups: comp.lang.ada Subject: Re: Another question about fixed point types. Date: Sun, 29 Aug 2010 05:31:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4c7991c8$0$2375$4d3efbfe@news.sover.net> <62f49eaf-ed47-47c7-a13a-96ca5750b4e8@y11g2000yqm.googlegroups.com> <4c7a44d1$0$2390$4d3efbfe@news.sover.net> NNTP-Posting-Host: 80.177.171.182 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1283085067 2037 127.0.0.1 (29 Aug 2010 12:31:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 29 Aug 2010 12:31:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i13g2000yqe.googlegroups.com; posting-host=80.177.171.182; posting-account=Fz1-yAoAAACc1SDCr-Py2qBj8xQ-qC2q User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:13801 Date: 2010-08-29T05:31:07-07:00 List-Id: On 29 Aug, 12:29, "Peter C. Chapin" wrote: > On 2010-08-29 05:02, Phil Thornley wrote: [...] > > (and if this is SPARK, there's no base type assertion for fixed point > > types...) > > I hope this doesn't sound like a stupid question but what do you mean by > "base type assertion." Do you mean 'for Julian_Day'Base use ...'? Peter, (sorry for causing some confusion) I was referring to the SPARK annotation that tells the Examiner which predefined type the compiler will use as the base type of a type declaration - it's needed for overflow checks and looks like: type An_Int is range -10_000 .. 10_000; --# assert An_Int'Base is Short_Integer; where the range for Short_Integer is defined in the SPARK configuration file (which should contain copies of the declarations in package Standard for your compiler). See Section 3.3.2.3 of the Proof Manual in the GPL 2010 documentation. These don't work for fixed point types are there aren't any fixed- point types declared in Standard. Cheers, Phil