From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d7c81785cd4fb3cb X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: I want 'Class'Input back! Date: 1999/10/26 Message-ID: <7v4j2o$6t0$1@nnrp1.deja.com>#1/1 X-Deja-AN: 540780018 References: <7u0as6$fmm$1@nnrp1.deja.com> <3814EF36.3D82D483@rational.com> X-Http-Proxy: 1.0 x34.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Oct 26 15:58:19 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-10-26T00:00:00+00:00 List-Id: In article <3814EF36.3D82D483@rational.com>, Mark Lundquist 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.