comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier <gautier@fakeaddress.nil>
Subject: Universal float or not - who's right ?
Date: Fri, 08 Sep 2006 15:14:49 +0200
Date: 2006-09-08T15:14:49+02:00	[thread overview]
Message-ID: <45016cb7$1_4@news.bluewin.ch> (raw)

Hullo - here is a nice case, with a trivial workaround given first, where 3 
compiler differs. Question to the Ada RM exegetes: who is right ?

package FF is
   type FFloat is new Float;
end;
with FF;

procedure Beauripple is

   generic
     type Num is digits <>;
     x  : Num;
   package P is end;

   c: constant:= 2.0**4;
   package FPc is new P(FF.FFLoat,c);
   -- Passes on compilers A,B,C - as expected

   d: constant FF.FFLoat:= 2.0**4;
   -- Fails on compiler A,B,C
   -- "**" is not visible, an "use FF;" is missing

   package FPe is new P(FF.FFLoat,2.0**4);
   -- ** A,B,C differ:
   -- Passes on C: (2.0**4) probably taken as universal float
   -- Fails on compiler A,B: same reason as for constant d

begin
   null;
end;
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



             reply	other threads:[~2006-09-08 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-08 13:14 Gautier [this message]
2006-09-08 17:13 ` Universal float or not - who's right ? Adam Beneschan
2006-09-09  1:35 ` Randy Brukardt
2006-09-11 19:44   ` Adam Beneschan
replies disabled

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