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,f51e6a898d00168d,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-26 15:04:54 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!128.39.3.166!uninett.no!newsfeed1.enitel.no!masternews.telia.net!news-sto.telia.net!newsfeed.formus.pl!news.nask.pl!news.internetia.pl!news.tpi.pl!not-for-mail From: niewiap@widzew.net (Pawe� Niewiadomski) Newsgroups: comp.lang.ada Subject: Accessibility level of a record extension???? Date: 26 Oct 2000 22:03:12 GMT Organization: tp.internet - http://www.tpi.pl Message-ID: <8FDAC26APablo@213.25.200.9> NNTP-Posting-Host: niewiap.tvsat364.lodz.pl X-Trace: news.tpi.pl 972597792 9742 195.117.215.73 (26 Oct 2000 22:03:12 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: 26 Oct 2000 22:03:12 GMT User-Agent: Xnews/03.04.11 Xref: supernews.google.com comp.lang.ada:1588 Date: 2000-10-26T22:03:12+00:00 List-Id: Here is a prototype of my queue package: -- Program 9.8 Full priority-queue ADT with ada.finalization; use ada.finalization; generic type item_type is private; null_item : item_type; with function "<" (x,y: item_type) return boolean is <>; package g_class_dllist_priority_queue is type handle_type is private; type queue is limited private; function empty(pq: queue) return boolean; procedure insert(pq: in out queue; item: in item_type; handle: out handle_type); procedure getmax(pq: in out queue; item: out item_type); procedure change(handle: in handle_type; item: in item_type); procedure remove(handle: in out handle_type); procedure join(pq1,pq2: in out queue); private type node; type link is access node; type handle_type is new link; type node is record item: item_type; prev, next: link; end record; type queue is new limited_controlled with record head, tail: link; end record; procedure initialize(pq: in out queue); end g_class_dllist_priority_queue; and here is the program I want to test the package with: with ada.text_io, g_class_dllist_priority_queue, dodatki; use ada.text_io, dodatki; procedure testuj is subtype str20 is string (1..20); null_str: str20:=(1..20=>' '); package queues is new g_class_dllist_priority_queue (str20, null_str, "<"); use queues; pq: queue; s: str20; handle: handle_type; begin ... ... end testuj; The compiler displays the following error: testowanie_kolejki_lista.adb: Error: line 6 col 79 LRM:3.9.1(3), The accessibility level of a record extension shall not exceed that of its parent; this also applies in a generic instantiation (In instance of generic g_class_dllist_priority_queue at program_09_08.ada: line 25 col 8) the error is caused by the package instantiation. I would be grateful if someone could explain what it means. I have tried searching in Reference Manual, but as I am not experienced in Ada programming, the explanation given by the RM is not clear enough for me. Thanks in advance Pawel