From: Jesper Quorning <jesper.quorning@gmail.com>
Subject: Re: Oddity with function returning image of fixed point type
Date: Thu, 2 Sep 2021 16:24:05 -0700 (PDT) [thread overview]
Message-ID: <549e09ab-5456-407e-8e78-9d7772a4e561n@googlegroups.com> (raw)
In-Reply-To: <sgr1s9$1njk$1@gioia.aioe.org>
torsdag den 2. september 2021 kl. 19.33.00 UTC+2 skrev Dmitry A. Kazakov:
> On 2021-09-02 19:08, Stephen Leake wrote:
> > Jesper Quorning <jesper....@gmail.com> writes:
> >
> >> Is something odd going on here?
> >> I did not expect Image_Odd1/2 to return floating point images.
> >
> > Right, this looks like a compiler bug. LRM 3.5(13):
> >
> > S'Last
> > S'Last denotes the upper bound of the range of S. The
> > value of this attribute is of the type of S.
> >
> > But this is acting like Fpt'Last is universal_real.
> No, it is this:
>
> LRM 4.10 (40/5)
Had to go back to Ada 83 LRM to find a chapter 4.10.
> "X'Image denotes the result of calling function S'Image with Arg being
> X, where S is the nominal subtype of X."
LRM 3.5 (35-36) says about the same.
> The question is what is the nominal subtype of Fpt'Last.
Well Image_Ok and Image_Odd_2 should both return Fpt'Last'Image so one of them must be bad.
Found LRM 3.5 (27.7/2) describing the image of a fixed point type.
Thanks for your responses. I will report the issue.
/Jesper
prev parent reply other threads:[~2021-09-02 23:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 10:25 Oddity with function returning image of fixed point type Jesper Quorning
2021-09-02 17:08 ` Stephen Leake
2021-09-02 17:32 ` Dmitry A. Kazakov
2021-09-02 23:24 ` Jesper Quorning [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox