comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de>
Subject: Re: Upcasting
Date: Wed, 6 Nov 2002 15:18:36 +0000 (UTC)
Date: 2002-11-06T15:18:36+00:00	[thread overview]
Message-ID: <aqbbsc$4kj$2@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: pan.2002.11.05.11.43.31.117258@greenroom.com.au

Matthew Baulch <matt@greenroom.com.au> wrote:
: But if you wanted to assign Foo1 to Foo2:
:        Foo2 := (Foo1 with 5.0, 10.0);
: would work.

Not sure I understand your question, because it is not obvious to me
what a varying type is. You could do

   foo2 := (foo1 with derived1 =>  5.0, derived2 => 10.0);

: 
: My question is: How would you do this 'upcasting' if varying
: types existed? Obviously the compiler could tell where each
: value must go based on their type if only one of their type
: was needed in the transition.



      parent reply	other threads:[~2002-11-06 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05 11:43 Upcasting Matthew Baulch
2002-11-05 12:49 ` Upcasting Lutz Donnerhacke
2002-11-05 17:33 ` Upcasting Stephen Leake
2002-11-06  6:26   ` Upcasting Matthew Baulch
2002-11-06 15:18 ` Georg Bauhaus [this message]
replies disabled

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