From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Smart to put "Flush(myfile)" before "Close(myfile") ? Date: Mon, 25 Jan 2021 12:41:42 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 25 Jan 2021 11:41:42 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a57826ff9d19a4e186ae4800116573d1"; logging-data="4020"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+amuNRO54dXCrFMKiX3XxH2UwvuGnqAmY=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 Cancel-Lock: sha1:uED7R9jVhQz6b+4gST5viazdXdA= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61190 List-Id: On 1/25/21 6:42 AM, reinert wrote: > Can an exception (runtime error) in principle, after closing a file, interrupt the process of writing the actual file to disc? > > I.e. is it smart to include a "Flush(myfile)" before "Close(myfile)" like this: In over 35 years of using Ada, I have never done this, and have never had a problem. YMMV -- Jeff Carter "You cheesy lot of second-hand electric donkey-bottom biters." Monty Python & the Holy Grail 14