comp.lang.ada
 help / color / mirror / Atom feed
* GNAT quirk
@ 2007-08-03 12:23 Jerry
  2007-08-03 20:05 ` Ludovic Brenta
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jerry @ 2007-08-03 12:23 UTC (permalink / raw)


procedure bad is
    a : Long_Float := 3.0;
begin
    for i in 1 .. Integer(Long_Float'Truncation(a)) loop
        null;
    end loop;
end bad;

bad.adb:4:37: unimplemented attribute
gnatmake: "bad.adb" compilation error



procedure good is
begin
    for i in 1 .. Integer(Long_Float'Truncation(2.0)) loop
        null;
    end loop;
end good;

Compiles OK.



procedure gooder is
    a    : Long_Float := 2.0;
    idum : Integer;
begin
    idum := Integer(Long_Float'Truncation(a));
    for i in 1 .. idum loop
        null;
    end loop;
end gooder;

Compiles OK.

Jerry




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

end of thread, other threads:[~2007-08-11  2:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-03 12:23 GNAT quirk Jerry
2007-08-03 20:05 ` Ludovic Brenta
2007-08-03 21:25   ` Jerry
2007-08-03 23:27 ` Compiles OK? " anon
2007-08-11  2:36 ` Nasser Abbasi

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