comp.lang.ada
 help / color / mirror / Atom feed
From: swhalen@netcom.com
Subject: Re: Newbe Q: generic array not working OK
Date: 2000/03/13
Date: 2000-03-13T00:00:00+00:00	[thread overview]
Message-ID: <8ahctn$r7k$1@slb2.atl.mindspring.net> (raw)
In-Reply-To: 38CBAE60.621F6A2D@skynet.be

I'm not sure I understand the question, but this works on
GNAT 3.12p (I got the same error as you on your version).

--  test.adb:
with Ada.Text_IO; use Ada.Text_IO;
with t ;
procedure test is
   --  type Vec is array (Integer range 1..6) of Float ;
   type Vec is array (Integer range <>) of Float ;
   function Sum is new t.Apply (Integer, Float, Vec, "+") ;
   subtype Vec6 is Vec (1..6);
   V6 : Vec6 := (6.6, 5.5, 4.4, 3.3, 2.2, 1.1);
begin
   Put_Line (Sum (V6)'Img);
end test ;


-- 
{===--------------------------------------------------------------===}
                Steve Whalen     swhalen@netcom.com
{===--------------------------------------------------------------===}




      parent reply	other threads:[~2000-03-13  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-12  0:00 Newbe Q: generic array not working OK Erik Pessers
2000-03-13  0:00 ` Jeffrey D. Cherry
2000-03-14  0:00   ` Ehud Lamm
2000-03-15  0:00     ` Tucker Taft
2000-03-13  0:00 ` swhalen [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