From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:a645:: with SMTP id p66mr2654779qke.499.1623291439464; Wed, 09 Jun 2021 19:17:19 -0700 (PDT) X-Received: by 2002:a25:cfc3:: with SMTP id f186mr4529154ybg.161.1623291439284; Wed, 09 Jun 2021 19:17:19 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 9 Jun 2021 19:17:19 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=184.98.75.134; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 184.98.75.134 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <331aa8fb-271a-4a3a-b95e-d10733cbc404n@googlegroups.com> Subject: Is it possible to redirect text output to a String or Unbounded_String? From: Jerry Injection-Date: Thu, 10 Jun 2021 02:17:19 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62155 List-Id: Is it possible to redirect text output to a String or Unbounded_String rather than to a file? I know there are versions of Put that take a string as a first argument but I don't want to have to write a special-purpose version of a stretch of code just for this purpose, since I want to keep the ability to also output text to a terminal. I suppose I could redirect text to a file and then somehow read it back in as one string but that seems like a kludge. Jerry