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,db1e3158636a30f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-16 19:26:37 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Fill string with multiple lines from standard_input Date: Fri, 16 Aug 2002 21:26:29 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <4519e058.0208161130.6c77138c@posting.google.com> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:28145 Date: 2002-08-16T21:26:29-05:00 List-Id: Ted Dennison wrote in message <4519e058.0208161130.6c77138c@posting.google.com>... >> Standard_Input is a file of sorts. Check the RM for more details. > >Yeah, but its an Ada.Text_IO.File_Type. Stream_IO can only deal with >files it can open by name itself. Huh? The point of Ada.Text_IO.Text_Streams is to convert a File_Type into a Stream. OIC -- someone is confusing Stream_IO with Streams. >What we don't have here is a reason why the input processing that >Ada.Text_IO.Text_Streams is doing to him is a problem. The only reason >I could think of is that it actually contains data rather than text. >This may sound a bit cheesy, but its exactly what a lot of Unix >programs like gunzip do. So the person trying to rewrite Linux in Ada >might stumble over this issue. :-) What input processing? I can't quite see why an implementor (particularly on Unix or Windows) would bother with any special processing here. The "stream" just does input on the raw handle (taking into account any buffering that is used) that corresponds to the Text_IO file. The device itself might be doing some special processing (as in a terminal or keyboard), but that doesn't extend to a disk file. Doing something else is more work and much slower -- why would you want to do that? (Besides the point that it is dubious that it is intended or allowed.) Keep in mind that Stream_IO was virtually untested by the ACATS until recently, and even now the standard has serious problems which can make the use of Stream_IO non-portable (since compilers pretty much all do the wrong thing). So even an implementation which passes the ACATS tests may still have problems in some cases (having to do with writing, reading is OK). Randy.