From: jedivaughn <jedivaughn14@gmail.com>
Subject: Re: Array of Strings
Date: Tue, 23 Sep 2008 07:07:17 -0700 (PDT)
Date: 2008-09-23T07:07:17-07:00 [thread overview]
Message-ID: <0e021c61-535a-4935-95ad-2a241fa7302f@e53g2000hsa.googlegroups.com> (raw)
In-Reply-To: f03439ba-4bf6-4ef5-82a8-7434bf6a4c2d@e39g2000hsf.googlegroups.com
If I wanted to make a package that made the array generic how would I
go about doing this. this is what I have which isn't working.
generic
type Element_Type is (<>);
type range1 is (<>);
package list is
type letters is private;
private
type letters is array (range1) of Element_Type;
end list;
and then in the main program I want
subtype range2 is integer range 1..25;
subtype str_length is string (1..25);
package List1 is new List(Element_Type => str_length, range1 =>
range2 );
when I try to compile the main program I get "expect discrete type in
instantiation of "Element_Type""
what am I doing wrong?
Thanks,
John
next prev parent reply other threads:[~2008-09-23 14:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-13 14:18 Array of Strings jedivaughn
2008-09-13 14:32 ` Ludovic Brenta
2008-09-14 0:11 ` anon
2008-09-14 9:45 ` Per Sandberg
2008-09-15 14:54 ` Adam Beneschan
2008-09-16 23:56 ` jedivaughn
2008-09-23 14:07 ` jedivaughn [this message]
2008-09-23 14:30 ` mockturtle
2008-09-23 14:41 ` Adam Beneschan
2008-09-23 14:47 ` Ludovic Brenta
2008-09-23 18:51 ` Jeffrey R. Carter
2008-09-24 12:00 ` jedivaughn
2008-09-24 14:36 ` Adam Beneschan
2008-09-24 15:13 ` John McCormick
2008-09-24 17:18 ` Jeffrey R. Carter
2008-09-28 12:24 ` jedivaughn
2008-09-28 13:01 ` mockturtle
2008-09-28 17:08 ` jedivaughn
2008-09-29 11:14 ` mockturtle
2008-09-28 19:00 ` Jeffrey R. Carter
2008-09-29 15:51 ` 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