comp.lang.ada
 help / color / mirror / Atom feed
From: Yves Bailly <kafka.fr@laposte.net>
Subject: Re: Trouble with overriding and class-wide parameters
Date: Sat, 15 Jul 2006 20:20:58 +0200
Date: 2006-07-15T20:21:04+02:00	[thread overview]
Message-ID: <44b93210$0$6521$636a55ce@news.free.fr> (raw)
In-Reply-To: l9r0i2ruslfk.14mw9cu6esnqd.dlg@40tude.net

Dmitry A. Kazakov wrote:
> What are you trying to achieve? The code looks wrong to me. Why are you
> using access types in a procedure? Why do you want to overload two
> different Setup? If the second parameter has to be covariant then Ada does
> support it:

It's only a very reduced sample code, extracted from a much larger
code base. The particular needs for access types are specific to
this code base. That said, replace any "not null access" for the
first parameters with "in out" and you'll get the same effect. The
second parameter *has* to be an access type, as it can be null
on purpose. See it as "parent object", in a tree-like structure
(just to give an idea).

I understand all of this might seem a little bit odd, now I really
would like to understand what happens and why it's not the second
Setup() (from Sub_Pkg) which is called.

Regards,

-- 
(o< | Yves Bailly  : http://kafka-fr.net   | -o)
//\ | Linux Dijon  : http://www.coagul.org | //\
\_/ |                                      | \_/`



  reply	other threads:[~2006-07-15 18:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-15 17:00 Trouble with overriding and class-wide parameters Yves Bailly
2006-07-15 18:00 ` Dmitry A. Kazakov
2006-07-15 18:20   ` Yves Bailly [this message]
2006-07-15 19:12     ` Dmitry A. Kazakov
2006-07-15 18:52 ` Jeffrey R. Carter
2006-07-15 20:03   ` Yves Bailly
2006-07-16  0:20     ` Jeffrey R. Carter
2006-07-16 10:00 ` Javier Miranda
2006-07-16 12:11   ` Ludovic Brenta
2006-07-16 13:36     ` Javier Miranda
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox