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-Thread: 103376,910a48a538936849 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: how to import a package Date: Wed, 06 Dec 2006 09:18:27 +0000 Organization: Pushface Message-ID: References: <1165371252.358817.57840@80g2000cwy.googlegroups.com> <1165374364.874225.237370@n67g2000cwd.googlegroups.com> <1165376051.158320.95410@j44g2000cwa.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1165396707 7452 62.49.19.209 (6 Dec 2006 09:18:27 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 6 Dec 2006 09:18:27 +0000 (UTC) Cancel-Lock: sha1:xm/ofp1ajiqZorGKtJCKCZCNeJ0= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:7819 Date: 2006-12-06T09:18:27+00:00 List-Id: "markww" writes: (it would be easier to comment on this if you didn't top-post! I've re-organised ...) > Adam Beneschan wrote: >> P is a generic package so you have to instantiate it. Something like: >> >> package Person_List is new P (T => Person_Rec); >> >> Now, Node and Node_Ptr are visible within Person_List, and the "Data" >> field in Person_List.Node will have type Person_Rec. > Thanks for your help. Now I've instantiated a list of my ppl records. > Right underneath the generic package definition I had: > > Start : Node_Ptr; > Last : Node_Ptr; > > but Node_Ptr is not visible. Is it no longer possible to have those two > variables declared like that? Either say Start : Person_List.Node_Ptr; (assuming Adam's instantiation) or 'use' the instantiation: package Person_List is new P (T => Person_Rec); use Person_List; --S