comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: I want 'Class'Input back!
Date: 1999/10/26
Date: 1999-10-26T00:00:00+00:00	[thread overview]
Message-ID: <7v4j2o$6t0$1@nnrp1.deja.com> (raw)
In-Reply-To: 3814EF36.3D82D483@rational.com

In article <3814EF36.3D82D483@rational.com>,
  Mark Lundquist <mark@rational.com> wrote:

>          function Input
>                      (Stream : access
Ada.Streams.Root_Stream_Type'Class) return T is
>          begin
>              return (T_Base'Input (Stream) with null record);
>          end Input;

I have to admit I'm not too sure what is going on here. The "return"
line is particularly perplexing. what does "T_Base'Input(Stream) with
null record" do?

>          procedure Output (Stream : access
Ada.Streams.Root_Stream_Type'Class;
>                            Item : in T) is
>          begin
>              T_Base'Output (Stream, T_Base (Item));
>          end Output;

This OTOH looks completely wrong. 'Output doesn't write the type's
tag to the output stream like 'Class'Output does. How is 'Class'Input
going to know which 'Input routine to dispatch to, if it doesn't know
the type's tag?

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Before you buy.




      parent reply	other threads:[~1999-10-26  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-12  0:00 I want 'Class'Input back! Ted Dennison
1999-10-12  0:00 ` Matthew Heaney
1999-10-13  0:00   ` Ted Dennison
1999-10-18  0:00     ` I want 'Class'Read back! (was: I want 'Class'Read back!) Ted Dennison
     [not found] ` <3814EF36.3D82D483@rational.com>
1999-10-26  0:00   ` Ted Dennison [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