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,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-17 04:43:21 PST From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: Replacement for Text_IO? (was Re: C bug of the day) References: <1054751321.434656@master.nyc.kbcfp.com> <20030611114948.00000bcc._elh_@_terma_._com_> <20030611125000.000018b5._elh_@_terma_._com_> <3EEE464A.D48A8E2D@somewhere.nil> User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X) Message-ID: Date: Tue, 17 Jun 2003 11:42:56 GMT NNTP-Posting-Host: 144.132.47.50 X-Complaints-To: abuse@bigpond.net.au X-Trace: news-server.bigpond.net.au 1055850176 144.132.47.50 (Tue, 17 Jun 2003 21:42:56 EST) NNTP-Posting-Date: Tue, 17 Jun 2003 21:42:56 EST Organization: BigPond Internet Services (http://www.bigpond.net.au) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.syd.connect.com.au!news.bri.connect.com.au!news.brisbane.pipenetworks.com!duster.adelaide.on.net!vicpull2.telstra.net!ken-transit.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail Xref: archiver1.google.com comp.lang.ada:39324 Date: 2003-06-17T11:42:56+00:00 List-Id: Georg Bauhaus wrote: > What's wrong with streams? Streams seem to be at the wrong level of abstraction. If you want to write out text files from an Ada program, how you do you an end of line character portably using streams? In text_io you just do new_line. In streams -which- character, or pair of characters do you output? Similarly for reading a text file. If I use streams I have to include code for the possible different end of line terminators. Processing text files in text_io is really very simple stuff, and easy to read (and it could be better if there were a function get_line...). I'm not sure that Streams would make for easy reading, unless it gets layered with a host independent Text_IO like feature (perhaps we could call it Ada.Next_IO ? :-) Dale