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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6bf481efd29cf77b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-14 20:53:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Behavior of Stream Attributes On Access Types. Date: Fri, 14 Jun 2002 14:53:01 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <4519e058.0206110547.526d2369@posting.google.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1024080783 4521 136.170.200.133 (14 Jun 2002 18:53:03 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 14 Jun 2002 18:53:03 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:26005 Date: 2002-06-14T18:53:03+00:00 List-Id: Nope. Not a "mistake" - except maybe stylistically. I have evolved a very specific question here that seems to be getting misunderstood. I don't want to know how to override the default 'Read and 'Write for an access type. (I know *how* to do that - but not necessarily what the "default" behavior is. >From other posts, I suspect just the pointer value is written.) What I want to know is what happens as you go up the food-chain on tagged records once you override the default 'Read and 'Write. I posted this elsewhere: "A" is a tagged type for which I accept the standard issue 'Write. "B" Is a descendend of "A" that adds a new field and for which I create my own 'Write for the type "B" - not for the field. "C" is a descendent of "B" that adds a new field. What happens when I call: "A'Class'Write (C_Object);"? Does the field added in "C" get written out with the standard issue 'Write or does the food-chain stop at the point where I overrode the 'Write? What happens if I call "C'Write (C_Object);" - assuming I didn't create my own user-defined "C'Write"? Hope this clarifies what it is I'm not understanding. Thanks for any help you can give. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Simon Wright" wrote in message news:x7vhek5sokk.fsf@pushface.org... > > I think this is where the mistake occurs. > > At the point where you declared Some_Access_Type, declare > > procedure My_Read > (Stream : access Ada.Streams.Root_Stream_Type'Class; > Obj : Some_Access_Type); > for Some_Access_Type'Read use My_Read; > > and also for My_Write, and all magically happens ..