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,842accb6a7d76669 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-05 14:39:21 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!ppp-1-168.cvx5.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.1 Date: Mon, 5 Nov 2001 22:37:05 -0000 Message-ID: <9s74eg$12b2bq$5@ID-25716.news.dfncis.de> References: <3BE301D1.4010106@telepath.com> <9s6d45$bd2$1@nh.pace.co.uk> NNTP-Posting-Host: ppp-1-168.cvx5.telinco.net (212.1.152.168) X-Trace: fu-berlin.de 1004999952 36014458 212.1.152.168 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:15873 Date: 2001-11-05T22:37:05+00:00 List-Id: But this can be done, and should be done, by declaring 'read' and 'write' procedures for the List_Type, conforming to what RM95 13.13.2 requires, and then using representation clauses to replace the default List_Type'Read and List_Type'Write attributes. This way, the required behaviour becomes implicit and automatic. -- Nick Roberts "Marin David Condic" wrote in message news:9s6d45$bd2$1@nh.pace.co.uk... > Just to toss in one more bit of feature-creep: > > procedure Load ( > File : in out Ada.Streams.Stream_IO.File_Type ; > Subject : out List) ; > > procedure Store ( > File : in out Ada.Streams.Stream_IO.File_Type ; > Subject : in List) ; > > > I'm presuming that the user can handle file management and keep track of > which list(s) they have put into the stream file and in what order. > (Dangerous, but so is life in general...) Under it lies some version of > 'Input and 'Output to the stream file. > > It might similarly have some advantage to have something like: > > procedure Put ( > Subject : in List > Bytes : out Ada.Streams.Stream_Element_Array) ; > > procedure Get ( > Subject : out List > Bytes : in Ada.Streams.Stream_Element_Array) ;