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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,7ae711c481a7059 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-07 16:03:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stob.telia.net!telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: Bj�rn Persson Newsgroups: comp.lang.ada Subject: Re: Can I treat Current_Output as a file of bytes? Message-ID: <20021108010337.395c1a90.bjorn_persson.spam-is-evil@sverige.nu> References: <20021104233454.2042ef78.bjorn_persson.spam-is-evil@sverige.nu> <4519e058.0211050630.7eb31354@posting.google.com> <20021105170130.2684e53f.bjorn_persson.spam-is-evil@sverige.nu> <4519e058.0211051427.48557033@posting.google.com> <4519e058.0211062004.4a55ab0e@posting.google.com> X-Newsreader: Sylpheed version 0.5.0 (GTK+ 1.2.10; i386-redhat-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Fri, 08 Nov 2002 00:03:38 GMT NNTP-Posting-Host: 213.64.50.193 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1036713818 213.64.50.193 (Fri, 08 Nov 2002 01:03:38 CET) NNTP-Posting-Date: Fri, 08 Nov 2002 01:03:38 CET Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:30562 Date: 2002-11-08T00:03:38+00:00 List-Id: On Thu, 7 Nov 2002 15:04:35 -0600 "Randy Brukardt" wrote: > Well, Ada does require that a file be terminated by a line terminator. > Some implementations do actually write this character out if it is > missing. Indeed, the first (Ada 83) version of Text_IO for Janus/Ada > worked this way. > > However, users were unhappy with that. Especially so with the page > terminator. You never want to write a page terminator unless it is > explicitly asked for. > > Luckily, you don't have to have an explicit page terminator to have the > semantics work right. You just have to "assume" one at the end of a > file. Doing the same for line terminators isn't much additional work, > and doing so eliminates weird behavior at the end of files that don't > have explicit terminators. A lot of the code in Text_IO is there to > handle these cases properly. > > IMHO, Text_IO should never write anything on 'Close', and this > discussion (again) shows why. But it is true that some implementations > do. I'd suggest complaining to the vendor if this is a problem. I don't think Text_IO's design is a problem in itself. It can be quite useful when working with text files. The problem is that the standard input and output streams are defined to be text files. The programmer should be allowed to decide whether Text_IO or Sequential_IO is most appropriate. Bj�rn Persson