From: Mart van de Wege <mvdwege@gmail.com>
Subject: Re: Can't access record attribute in derived type
Date: Wed, 08 Mar 2017 22:05:15 +0100
Date: 2017-03-08T22:05:15+01:00 [thread overview]
Message-ID: <86efy74gz8.fsf@gaheris.avalon.lan> (raw)
In-Reply-To: eib4eeFd7tsU1@mid.individual.net
Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
> On 17-03-08 17:06 , Mart van de Wege wrote:
>> "G.B." <bauhaus@notmyhomepage.invalid> writes:
>>
>>> On 08/03/2017 15:15, Mart van de Wege wrote:
>>>> The declarations are private, but shouldn't a
>>>> tagged type inherit the entire record of its parent type? That means
>>>> that it should have a Parents selector, shouldn't it?
>>>
>>> Just to make sure, is this also a hierarchy of child
>>> packages, like
>>>
>>> P
>>> Creature
>>> P.C
>>> Person
>>> P.C.G
>>> Knight
>>>
>>> so that every derived type's definition has visibility
>>> into the respective parent package's private part?
>>>
>> Yep, it is.
>
> But you said that the problem appeared in a file called
> "knights.adb". If that is the full name, and if you are using the GNAT
> file-name convention, it is _not_ a child package of any other
> package. Did you abbreviate the file name in your post?
>
> A child package like Creatures.Persons.Knights would have a file-name
> of the form "creatures-persons-knights.adb".
>
> What are the actual and full names of all the relevant packages?
Aaah. I think I see the problem. Yes, Knights is on the same level of
the hierarchy as Persons.
The full hierarchy is:
Pendragon
Pendragon.Persons
Pendragon.Knights
Knights withs Persons, but they are on the same level.
(And for the curious, this is a random character generator for the King
Arthur Pendragon roleplaying game. It works quite well for the 50% of
the rules I already covered, creating single characters, but I have
problems getting my design to work with families, aka containers within
the Persons/Knights objects containing other Persons/Knights).
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
next prev parent reply other threads:[~2017-03-08 21:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 14:15 Can't access record attribute in derived type Mart van de Wege
2017-03-08 14:24 ` G.B.
2017-03-08 15:06 ` Mart van de Wege
2017-03-08 19:30 ` Niklas Holsti
2017-03-08 21:05 ` Mart van de Wege [this message]
2017-03-08 20:08 ` Randy Brukardt
2017-03-08 21:06 ` Mart van de Wege
2017-03-08 21:12 ` Mart van de Wege
2017-03-08 21:25 ` Mart van de Wege
2017-03-08 21:50 ` Simon Wright
2017-03-08 22:35 ` Mart van de Wege
2017-03-08 21:03 ` Shark8
2017-03-08 21:16 ` Mart van de Wege
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox