comp.lang.ada
 help / color / mirror / Atom feed
From: mario.blunk.gplus@gmail.com
Subject: Re: how to read status of current_output
Date: Wed, 6 Jun 2018 00:14:54 -0700 (PDT)
Date: 2018-06-06T00:14:54-07:00	[thread overview]
Message-ID: <8d88b7fa-3939-43d5-9de3-e16eee656a15@googlegroups.com> (raw)
In-Reply-To: <pf6h0k$kdg$1@dont-email.me>

On Tuesday, June 5, 2018 at 7:24:37 PM UTC+2, G. B. wrote:
> <mario.blunk.gplus@gmail.com> wrote:
> > Hello,
> > 
> > I have a program that frequently changes the current_output (with
> > statement set_output (blabla)). During the course of the program I want
> > to read the status, means the current value of current_output. I tried this code:
> > 
> > handle_1, handle_2 : ada.text_io.file_type;
> > 
> > if ada.text_io.file_type (current_output) = handle_1 then ...
> 
> Can you wrap Set_Output in a subprogram that stores the state?

I was thinking about this approach, but it would introduce another variable that keeps track of the current output. The solution with name (current_output) seems the easiest and most elegant. Thanks anyway !

  reply	other threads:[~2018-06-06  7:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  9:54 how to read status of current_output mario.blunk.gplus
2018-06-05 11:44 ` AdaMagica
2018-06-06  7:12   ` mario.blunk.gplus
2018-06-05 17:24 ` G. B.
2018-06-06  7:14   ` mario.blunk.gplus [this message]
2018-06-06 11:01     ` Marius Amado-Alves
2018-06-06 17:20       ` mario.blunk.gplus
2018-06-06 20:28         ` Randy Brukardt
replies disabled

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