comp.lang.ada
 help / color / mirror / Atom feed
* Universal float or not - who's right ?
@ 2006-09-08 13:14 Gautier
  2006-09-08 17:13 ` Adam Beneschan
  2006-09-09  1:35 ` Randy Brukardt
  0 siblings, 2 replies; 4+ messages in thread
From: Gautier @ 2006-09-08 13:14 UTC (permalink / 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!



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-11 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-08 13:14 Universal float or not - who's right ? Gautier
2006-09-08 17:13 ` Adam Beneschan
2006-09-09  1:35 ` Randy Brukardt
2006-09-11 19:44   ` Adam Beneschan

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