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,2e66fe8b30e3ee2c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-01 23:58:30 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!europa.netcrusader.net!205.252.116.205!howland.erols.net!newshub2.home.com!news.home.com!news1.frmt1.sfba.home.com.POSTED!not-for-mail From: tmoran@bix.com Newsgroups: comp.lang.ada Subject: Re: S'Write and How To Count Bytes References: <39D6891A.7DC448B6@acm.org> X-Newsreader: Tom's custom newsreader Message-ID: Date: Mon, 02 Oct 2000 06:58:29 GMT NNTP-Posting-Host: 24.20.190.201 X-Complaints-To: abuse@home.net X-Trace: news1.frmt1.sfba.home.com 970469909 24.20.190.201 (Sun, 01 Oct 2000 23:58:29 PDT) NNTP-Posting-Date: Sun, 01 Oct 2000 23:58:29 PDT Organization: @Home Network Xref: supernews.google.com comp.lang.ada:918 Date: 2000-10-02T06:58:29+00:00 List-Id: > Is there any good way of determining in advance how many bytes you are > going to get when converting an object to a stream? I don't think I understand. Why not type Buffer_Type is new Root_Stream_Type with record Last : Natural := 0; Data : Stream_Element_Array(1 .. 1000); end record; Then each 'write can append its stuff to Data and increment Last and when they have all finished you have a count and a Stream_Element_Array to pass to your IO output routine. ----------------- The experienced programmer knows that work performed after midnight is likely to be negatively useful.