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!mx02.eternal-september.org!.POSTED!not-for-mail From: Bob Duff Newsgroups: comp.lang.ada Subject: Re: function Is_Open (File : File_Type) return Boolean; :Text_io Date: Mon, 26 Oct 2015 18:48:51 -0400 Organization: A noiseless patient Spider Message-ID: <87twpd2qlo.fsf@theworld.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="ff390eae7dae78eb85daece3eef8a589"; logging-data="30204"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xA0r5D3zKZ+LFPbJIDeAy" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:JfF4lg6r9W/5Mea9TOued9rNcHY= sha1:6GGSIWol3azvEj/4YY7Ax3X9iKE= Xref: news.eternal-september.org comp.lang.ada:28064 Date: 2015-10-26T18:48:51-04:00 List-Id: comicfanzine@gmail.com writes: > Can someone please show my a code in which this function is used , i'm > lost , thanks . Most code is written so that it is statically known whether a file is open, so Is_Open is close to useless. Not entirely useless -- you might use it in an assertion, such as: subtype Open_File is File with Predicate => Is_Open(Open_File); And Niklas Holsti gave a fairly realistic example where it is NOT statically known whether the file is open, so the program checks at run time. - Bob