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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: how to read status of current_output Date: Tue, 5 Jun 2018 17:24:36 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 5 Jun 2018 17:24:36 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="0c42f9d1d820cbdca75a3a6659484707"; logging-data="20912"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19avBglD3Mri1o1js/WqGSG+Z3fftAQSLE=" User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch) Cancel-Lock: sha1:t7qzXgt2LCeoQKbPvTxqSpKdJHA= sha1:KpycjVMabpvBBQ1DvkjtfpZU5mY= Xref: reader02.eternal-september.org comp.lang.ada:52948 Date: 2018-06-05T17:24:36+00:00 List-Id: 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?