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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!gegeweb.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: What's the cause of extra new line with Text_IO when program exit Date: Mon, 19 Aug 2013 16:58:34 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1376949516 21660 69.95.181.76 (19 Aug 2013 21:58:36 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 19 Aug 2013 21:58:36 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:16906 Date: 2013-08-19T16:58:34-05:00 List-Id: "Dennis Lee Bieber" wrote in message news:c5ev09h1d6ffg0bbgtqebl4fjt5d567bco@4ax.com... > On Thu, 15 Aug 2013 20:17:46 -0700, Jeffrey Carter > declaimed the following: > >>While it is not defined by the language what happens to a File_Type when >>the >>program ends [ARM A.7(6)], it does require that File_Type have >>finalization [ARM >>A.10.1(86)]. A logical thing for this finalization to do is to make sure >>that >>the last line is terminated, and it appears that your implementation does >>this. >> > Heck, isn't there some mention of also having an EOF marker written? Right, but there is no requirement in Ada that EOF markers have any particular representation. In particular, they might be written as sometimes, and simply "virtual" in other cases. (End-of-page markers are almost always handled as "virtual" at the end of files, because no one wants every file to end with .) Janus/Ada never writes any EOF or EOP characters at the end of files; Get "manufactures" them if they are not present at the end of a file. That makes reading from a text file much more complex, but it also means that pretty much any text file can be read with Text_IO and it will behave sensibly. Randy.