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.9 required=5.0 tests=BAYES_00 autolearn=ham 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 11:43:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!kibo.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Behavior of Stream Attributes On Access Types. Date: 14 Jun 2002 19:27:39 +0100 Organization: Pushface Sender: simon@smaug Message-ID: References: <4519e058.0206110547.526d2369@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk X-NNTP-Posting-Host: pogner.demon.co.uk:62.49.19.209 X-Trace: news.demon.co.uk 1024080136 nnrp-08:821 NO-IDENT pogner.demon.co.uk:62.49.19.209 X-Complaints-To: abuse@demon.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: archiver1.google.com comp.lang.ada:25962 Date: 2002-06-14T19:27:39+01:00 List-Id: "Marin David Condic" writes: > package Level_1 is > type L1 is tagged record > A : Integer ; > end record ; > -- > -- Here I have L1'Read, L1'Write, L1'Input, L1'Output > -- and L1'Class'Read L1'Class'Write L1'Class'Input L1'Class'Output > -- > end Level_1 ; > > package Level_1.Level_2 is > type L2 is new Level_1.L1 with record > B : Some_Access_Type := null ; > end record ; > -- > -- Now I have to define my own 'Read and 'Write 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 ..