From: Simon Wright <simon@pushface.org>
Subject: Re: how to import a package
Date: Wed, 06 Dec 2006 09:18:27 +0000
Date: 2006-12-06T09:18:27+00:00 [thread overview]
Message-ID: <m2u009jsbg.fsf@grendel.local> (raw)
In-Reply-To: 1165376051.158320.95410@j44g2000cwa.googlegroups.com
"markww" <markww@gmail.com> 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
next prev parent reply other threads:[~2006-12-06 9:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 2:14 how to import a package markww
2006-12-06 3:06 ` Adam Beneschan
2006-12-06 3:34 ` markww
2006-12-06 9:18 ` Simon Wright [this message]
2006-12-06 19:47 ` Jeffrey R. Carter
2006-12-06 23:56 ` markww
2006-12-07 1:18 ` Björn Persson
2006-12-07 1:26 ` Brian May
2006-12-07 4:14 ` markww
2006-12-07 4:40 ` Brian May
2006-12-07 9:32 ` Stuart
2006-12-07 11:21 ` Jean-Pierre Rosen
2006-12-11 6:16 ` markww
2006-12-11 6:50 ` markww
2006-12-11 9:40 ` Georg Bauhaus
2006-12-11 14:19 ` markww
2006-12-11 15:03 ` Dmitry A. Kazakov
2006-12-11 16:22 ` Adam Beneschan
2006-12-11 20:28 ` Jeffrey R. Carter
2006-12-12 3:19 ` markww
2006-12-12 3:31 ` Jeffrey R. Carter
2006-12-12 9:03 ` Stuart
2006-12-12 10:56 ` Georg Bauhaus
2006-12-11 7:00 ` Simon Wright
2006-12-07 4:06 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox