comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <p.obry@wanadoo.fr>
Subject: Re: Two class-wide operands, but only one controlling
Date: 24 Nov 2002 22:56:44 +0100
Date: 2002-11-24T21:57:23+00:00	[thread overview]
Message-ID: <u7kf2ws0z.fsf@wanadoo.fr> (raw)
In-Reply-To: 3de0b9be$0$304$bed64819@news.gradwell.net


porton@ex-code.com (Victor Porton) writes:

> Not what I need. basically I have a container and an iterator.
> Both a derived (in my case I need this) from abstract container
> and abstract iterator. I need procedure like:
> 
> procedure Next
>   (C: Abstract_Container'Class; I: in out Abstract_Iterator'Class);
>   
> but this is an error as we have two controlling operands of
> different types :-( 

Certainly not. 'Class formal parameters are not controlling operands, your
Next procedure above is perfectly legal.

> It was simple in C++. Ada has disadvantages...

No, you misunderstood Ada :)

> > The actual parameter of a class-wide formal parameter cannot be a
> > controlling operand.
> 
> Samuel, di you meant vice versa?

No, we have be 2 of us saying the same thing but you did not listen :)

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



  reply	other threads:[~2002-11-24 21:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-23 16:10 Two class-wide operands, but only one controlling Victor Porton
2002-11-23 19:50 ` Pascal Obry
2002-11-24  8:27 ` Victor Porton
2002-11-24  8:59   ` Samuel Tardieu
2002-11-24 11:34 ` Victor Porton
2002-11-24 21:56   ` Pascal Obry [this message]
2002-11-25 22:17   ` Matthew Heaney
2002-11-27 17:25   ` Matthew Heaney
2002-11-25 19:19 ` Matthew Heaney
replies disabled

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