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.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM, WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:a08c:: with SMTP id j134mr12023972qke.92.1611777557659; Wed, 27 Jan 2021 11:59:17 -0800 (PST) X-Received: by 2002:a25:768e:: with SMTP id r136mr18988828ybc.92.1611777557452; Wed, 27 Jan 2021 11:59:17 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!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, 27 Jan 2021 11:59:17 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=70.21.182.175; posting-account=h3IwYwoAAAAeE2lWQnRSCqcQ0dO-KDvQ NNTP-Posting-Host: 70.21.182.175 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5af60c88-b7ab-4849-badb-c407823d45e0n@googlegroups.com> Subject: Problem with unbounded string input From: Brian McGuinness Injection-Date: Wed, 27 Jan 2021 19:59:17 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61222 List-Id: I was having trouble reading unbounded strings, so I wrote a short test pro= gram and had the same problem. with Ada.Strings.Unbounded; with Ada.Text_IO; with Ada.Text_IO.Unbounded_IO; procedure scan2 is use Ada.Strings.Unbounded; line : Ada.Strings.Unbounded.Unbounded_String; begin loop Ada.Text_IO.Put ("-> "); line :=3D Ada.Text_IO.Unbounded_IO.Get_Line; exit when line =3D "quit"; Ada.Text_IO.Unbounded_IO.Put_Line ("""" & line & """"); end loop; end scan2; When I compile this with gnatmake 8.3.0 under Linux Mint Debian edition 4 a= nd run it, every so often when I type a line and hit Enter there is no resp= onse until I hit Enter again, and then everything typed before the first En= ter is ignored. The rest of the time the lines I type are read and returne= d correctly. I am really puzzled by this. Is this a bug in the Ada librar= y or am I doing something wrong? --- Brian McGuinness