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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,624c77c4e3ffaa2 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!x1g2000prh.googlegroups.com!not-for-mail From: deadlyhead Newsgroups: comp.lang.ada Subject: Re: Defaulting to Standard_Output Date: Thu, 23 Oct 2008 18:14:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3a558b10-da3e-4dfa-93e1-573170dfa565@x1g2000prh.googlegroups.com> References: NNTP-Posting-Host: 216.57.220.9 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1224810865 3498 127.0.0.1 (24 Oct 2008 01:14:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 24 Oct 2008 01:14:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x1g2000prh.googlegroups.com; posting-host=216.57.220.9; posting-account=snJuNwoAAABnc8T9lYkBlDQrDdSjOjG2 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2479 Date: 2008-10-23T18:14:24-07:00 List-Id: On Oct 23, 5:16=A0pm, "Jeffrey R. Carter" wrote: > deadlyhead wrote: > > > If anybody has a better way of handling defaulting to Standard_Output, > > I'd like to see it. =A0This works for me, and seems elegant enough. =A0= 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