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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.31.48.86 with SMTP id w83mr39011372vkw.5.1453393418794; Thu, 21 Jan 2016 08:23:38 -0800 (PST) X-Received: by 10.182.166.97 with SMTP id zf1mr567210obb.18.1453393418755; Thu, 21 Jan 2016 08:23:38 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!94no6529921qgt.1!news-out.google.com!l1ni2860igd.0!nntp.google.com!o2no5025321iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 21 Jan 2016 08:23:38 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.55.202.61; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.55.202.61 References: <730fcd26-19e5-43e8-a071-5d2881d4a5bc@googlegroups.com> <8760yndy7w.fsf@adaheads.sparre-andersen.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7e5ff177-393c-4164-a5db-312969fec7e1@googlegroups.com> Subject: Re: Out_File , excess line From: AdaMagica Injection-Date: Thu, 21 Jan 2016 16:23:38 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29189 Date: 2016-01-21T08:23:38-08:00 List-Id: Am Donnerstag, 21. Januar 2016 15:42:58 UTC+1 schrieb Dmitry A. Kazakov: > On 2016-01-21 12:57, G.B. wrote: > > On 21.01.16 11:56, AdaMagica wrote: > >> > >> I guess the OP is using GNAT, and this friendly compiler seems to > >> properly close the files upon leaving the scope of a file object. > > > > On Windows, that did not seem to be the case. > > Even if the process does not close the file Windows does this upon > process termination. However the file end is not set if not closed > "normally", e.g. per Close call. Hm, I tried leaving the program with and without closing the file. The result (on Windows) was both the same, a CR and LF written. While the file is still open, a dir command shows the file with 0 bytes, after leaving the program, with two bytes (13 10). Since Windows surely does not add the line terminator, it must be friendly Gnat who's closing the file implicitly.