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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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: "G.B." Newsgroups: comp.lang.ada Subject: Re: text_io.Put_line behaviour on failure Date: Fri, 4 Dec 2015 16:27:39 +0100 Organization: A noiseless patient Spider Message-ID: References: <77de5ee0-3ae1-4bad-ac44-e61619c126b0@googlegroups.com> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 4 Dec 2015 15:25:13 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="7744"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+S/Ss5WIhsQpBcdPXnkovrN2U646PCRJ0=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <77de5ee0-3ae1-4bad-ac44-e61619c126b0@googlegroups.com> Cancel-Lock: sha1:nCBgvA4NoD8Mwfc+5vtsndDHE70= Xref: news.eternal-september.org comp.lang.ada:28630 Date: 2015-12-04T16:27:39+01:00 List-Id: On 04.12.15 15:43, pettylarsony@gmail.com wrote: > Having searched the ADA documentation and goolged extensively I cannot find any definition of how this function behaves under a failure condition or even if it can fail. > > Example. Text_IO.Output is re-directed to a file. The disc on which the file resides becomes full, the file is deleted, or the file is set read_only.. the first instance is the most likely case to cause a failure.. > > So what happens when you call Put_Line("Some arbitrary text string")? > External conditions like disks being full would not typically be handled by any languages run-time system: Since the language's definition does not even assume an operating system, or disks, little is fixed in this regard. The effect may be even more out of reach of the language proper if during translation of the program nothing is decided, like Standard_Output later being redirected in some shell script, or not, say. Handling properties of specific OS's behavior will need linking with OS procedures, I'd think. E.g., the "disk full" condition may not even have a physical counterpart, insofar as the root user of Unix-like OSs may still have some 5% left where other OS UIDs have run out of "disk space". This would not be the subject of a language definition, neither of Ada nor of C., etc.