From: Preben Randhol <randhol+abuse@pvv.org>
Subject: premature use
Date: Sun, 5 May 2002 15:03:53 +0000 (UTC)
Date: 2002-05-05T15:03:53+00:00 [thread overview]
Message-ID: <slrnadaiek.5uk.randhol+abuse@kiuk0152.chembio.ntnu.no> (raw)
When I try to make the package as below I get from GNAT the error:
premature use of private type
I understand this is correct, but is it possible to make this package in
a way that makes the Help_File_Type and Help_Index_Type private while
keeping File_List and Index_List public?
Thanks in advance.
Preben
--------------------------------------------------------------------
with Double_Linked_List;
with Ada.Strings.UnBounded; use Ada.Strings.UnBounded;
pragma Elaborate_All (Double_Linked_List);
package Help_Lists is
type Help_File_Type is private;
type Help_Index_Type is private;
package File_List is
new Double_Linked_List (Data_Type => Help_File_Type);
package Index_List is
new Double_Linked_List (Data_Type => Help_Index_Type);
private
type Help_File_Type is
record
Topic : Unbounded_String;
Text : Unbounded_String;
end record;
type Help_Index_Type is
record
Section : Unbounded_String;
List : File_List.List_Type;
end record;
Help_List : Index_List.List_Type := Index_List.New_List;
end Help_Lists;
---------------------------------------------------------------------
next reply other threads:[~2002-05-05 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-05 15:03 Preben Randhol [this message]
2002-05-05 18:20 ` premature use Jim Rogers
2002-05-06 9:20 ` Preben Randhol
2002-05-06 14:06 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox