comp.lang.ada
 help / color / mirror / Atom feed
From: Phil Thornley <phil.jpthornley@gmail.com>
Subject: Re: Another question about fixed point types.
Date: Sun, 29 Aug 2010 05:31:07 -0700 (PDT)
Date: 2010-08-29T05:31:07-07:00	[thread overview]
Message-ID: <fe942a67-b3f8-4195-bf7e-6e10201cb715@i13g2000yqe.googlegroups.com> (raw)
In-Reply-To: 4c7a44d1$0$2390$4d3efbfe@news.sover.net

On 29 Aug, 12:29, "Peter C. Chapin" <chap...@acm.org> 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




  reply	other threads:[~2010-08-29 12:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-28 22:45 Another question about fixed point types Peter C. Chapin
2010-08-29  6:32 ` Yannick Duchêne (Hibou57)
2010-08-29 11:23   ` Peter C. Chapin
2010-08-29  9:02 ` Phil Thornley
2010-08-29 11:29   ` Peter C. Chapin
2010-08-29 12:31     ` Phil Thornley [this message]
2010-08-29 13:49       ` Jeffrey Carter
2010-08-29 14:20       ` Peter C. Chapin
2010-08-29 17:50         ` Phil Thornley
2010-08-29 22:03           ` Peter C. Chapin
2010-08-30  8:50           ` Mark Lorenzen
2010-08-29 10:24 ` Simon Wright
2010-08-29 14:02 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox