From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,95e83dd0c6370d84,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-05 08:03:55 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: premature use Date: Sun, 5 May 2002 15:03:53 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1020611033 14477 129.241.83.78 (5 May 2002 15:03:53 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Sun, 5 May 2002 15:03:53 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:23559 Date: 2002-05-05T15:03:53+00:00 List-Id: 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; ---------------------------------------------------------------------