comp.lang.ada
 help / color / mirror / Atom feed
From: deadlyhead <deadlyhead@gmail.com>
Subject: Re: Defaulting to Standard_Output
Date: Thu, 23 Oct 2008 18:14:24 -0700 (PDT)
Date: 2008-10-23T18:14:24-07:00	[thread overview]
Message-ID: <3a558b10-da3e-4dfa-93e1-573170dfa565@x1g2000prh.googlegroups.com> (raw)
In-Reply-To: Dt8Mk.402515$yE1.237583@attbi_s21

On Oct 23, 5:16 pm, "Jeffrey R. Carter"
<spam.jrcarter....@spam.acm.org> wrote:
> deadlyhead wrote:
>
> > If anybody has a better way of handling defaulting to Standard_Output,
> > I'd like to see it.  This works for me, and seems elegant enough.  It
> > avoids a lot of messy conditionals in the body, anyway.
>
> This is what Ada.Text_IO.Set_Output is for.
>
> --
> Jeff Carter
> "When danger reared its ugly head, he bravely
> turned his tail and fled."
> Monty Python and the Holy Grail
> 60

I looked over Set_Output in the ARM and I went back looking for it in
the comp.lang.ada, and it looks to me that Set_Output will direct all
Put statements to Outfile if a file isn't designated, rather than
having calls of Put (Outfile, Item) appear in Standard_Output.

This doesn't appear to be the functionality I'm looking for.  If no
file is specifically named for Outfile, I want all output to appear on
the terminal.  If a file is named for Outfile, then direct output to
that.  Using Set_Output (Outfile), wouldn't I still need a Create
statement for Outfile?

-- deadlyhead



  reply	other threads:[~2008-10-24  1:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 23:10 Defaulting to Standard_Output deadlyhead
2008-10-24  0:16 ` Jeffrey R. Carter
2008-10-24  1:14   ` deadlyhead [this message]
2008-10-24  1:49     ` Adam Beneschan
2008-10-24  2:57       ` deadlyhead
2008-10-24  3:57         ` Jeffrey R. Carter
2008-10-24  6:28           ` deadlyhead
replies disabled

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