comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@futureapps.invalid>
Subject: Re: text_io.Put_line behaviour on failure
Date: Fri, 4 Dec 2015 16:27:39 +0100
Date: 2015-12-04T16:27:39+01:00	[thread overview]
Message-ID: <n3sb8p$7i0$1@dont-email.me> (raw)
In-Reply-To: <77de5ee0-3ae1-4bad-ac44-e61619c126b0@googlegroups.com>

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.


  parent reply	other threads:[~2015-12-04 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 14:43 text_io.Put_line behaviour on failure pettylarsony
2015-12-04 15:12 ` AdaMagica
2015-12-04 15:27 ` G.B. [this message]
2015-12-04 18:57 ` Jeffrey R. Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox