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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d8a4797a79f9c90f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-28 19:06:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3ED56B0B.4050709@spam.com> From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: I/O - exception handling References: <3ED4114A.5060204@spam.com> <3ED53D7E.40901@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 May 2003 02:03:57 GMT NNTP-Posting-Host: 63.184.17.204 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1054173837 63.184.17.204 (Wed, 28 May 2003 19:03:57 PDT) NNTP-Posting-Date: Wed, 28 May 2003 19:03:57 PDT Xref: archiver1.google.com comp.lang.ada:37964 Date: 2003-05-29T02:03:57+00:00 List-Id: Robert I. Eachus wrote: > Randy Brukardt wrote: > >> While I don't think any implementor would plan to raise an exception >> from Is_Open, certainly the standard allows Use_Error or Device_Error >> and of course Storage_Error and Program_Error (if there are elaboration >> problems). In practice, I think it's safe to ignore that possibility. > > Totally agree with respect to Is_Open. However, there are cases where > exceptions on Close are not only possible but likely in some situations. > For example it is perfectly legal in Ada to close Standard_Output and > other standard files. There was even an AI a while back making it clear > that it is legal to do so, and what it means if the implementation does > support it. But implementations (notice, not compilers, this is a > target OS or environment issue) may not allow some files to be closed, > and you will get Use_Error. The language lawyers have spoken. To summarize, if I understand correctly, if you're dealing with "normal" files (not a standard file or device), Is_Open won't raise an exception and Close will only raise an exception if the file isn't open. -- Jeff Carter "Hello! Smelly English K...niggets." Monty Python & the Holy Grail