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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a18a962b36ffa4c6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!e3g2000cwe.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: End_Of_File underspecified? Date: 21 Nov 2006 09:40:57 -0800 Organization: http://groups.google.com Message-ID: <1164130857.227365.140900@e3g2000cwe.googlegroups.com> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1164130867 21174 127.0.0.1 (21 Nov 2006 17:41:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Nov 2006 17:41:07 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e3g2000cwe.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news2.google.com comp.lang.ada:7617 Date: 2006-11-21T09:40:57-08:00 List-Id: Maciej Sobczak wrote: > Hi, > > I cannot find any specification of whether End_Of_File can be a blocking > operation. > Unfortunately, my experience from other languages breaks into pieces > here, because Ada uses EOF a bit differently (in other languages the EOF > flag is set *after* hitting the end of file and as a result of it, so > that querying the flag is just this - querying the flag). > > I would expect that End_Of_File is a non-blocking predicate that allows > the programmer to take the decision on what to do next with the file. > Curiously, it does not seem to be the case - End_Of_File can block, > which is easy to demonstrate on a regular Unix-like (GNAT) system. > > Nothing in ARM mentions this. I assume you're talking about a "potentially blocking" operation? 9.5.1(18) says, "In particular, the subprograms of the language-defined input-output packages that manipulate files (implicitly or explicitly) are potentially blocking." AI95-178 and AARM05 9.5.1(18.a/2) says that any subprogram in a language-defined I/O package (or instance thereof) that has a file parameter or result, or operates on a default file, is considered to manipulate a file. This includes pretty much everything, including End_Of_File. I suppose you're right that the explanation of "manipulation" isn't, technically, in the ARM---maybe a Note should be added, although it may be too late. -- Adam