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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,68494635acddb77e X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.buerger.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 20 Aug 2008 08:45:03 +0200 From: Georg Bauhaus Reply-To: rm.tsoh-bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: File output and buffering References: <60a35fd4-e5a6-4aa0-a73f-6815ce7e92fc@f36g2000hsa.googlegroups.com> In-Reply-To: <60a35fd4-e5a6-4aa0-a73f-6815ce7e92fc@f36g2000hsa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48abbd6f$0$11741$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 20 Aug 2008 08:45:03 CEST NNTP-Posting-Host: e6c1cf31.newsspool1.arcor-online.net X-Trace: DXC=cn>f Maciej Sobczak wrote: > Let's suppose that I want to add buffering to my output. I can write > the stream type that does the necessary magic, but how can I reuse the > formatting machinery that is already available in Ada.Text_IO and > related packages? Some formatting procedures from {Number}_IO and from Editing can write to a String instead of to a File_Type. Can you stream the strings to a buffer? There is an article on AdaPower entitlet something like "How to access memory as a String". I think it will illustrate reliable tricks, possibly of some use when handling data in the "external" world. In any case, char_array values are good for OS procedures of names like write, read, and so on. -- Georg Bauhaus Y A Time Drain http://www.9toX.de