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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.8.169 with SMTP id h41mr42854707ioi.31.1452102060475; Wed, 06 Jan 2016 09:41:00 -0800 (PST) X-Received: by 10.182.241.195 with SMTP id wk3mr877306obc.8.1452102060425; Wed, 06 Jan 2016 09:41:00 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!o2no449991iga.0!news-out.google.com!f6ni45443igq.0!nntp.google.com!o2no449988iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 6 Jan 2016 09:41:00 -0800 (PST) In-Reply-To: <1ad2ecef-bfed-4129-8b27-da24909d72db@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.36; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.36 References: <1ad2ecef-bfed-4129-8b27-da24909d72db@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Unbounded.String instead of Standard.String From: Anh Vo Injection-Date: Wed, 06 Jan 2016 17:41:00 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29036 Date: 2016-01-06T09:41:00-08:00 List-Id: On Wednesday, January 6, 2016 at 7:21:54 AM UTC-8, comicf...@gmail.com wrote: > > Here is a tiny hint. Linkable/Executable procedure has no parameter. > > > > Anh Vo > > I didn't knew that a main procedure has no parameter . > Plus , i was a beginner with ubunded_string , so here is the correction : > > with Ada.Text_IO; > with Ada.Strings.Unbounded; > with Ada.Text_IO.Unbounded_IO; > > use Ada.Text_IO; > use Ada.Strings.Unbounded; > use Ada.Text_IO.Unbounded_IO; > > procedure autre is > var_string : Unbounded_String; > begin > get_line(var_string); > put(var_string); > end autre; To make it clearer I would suggest to add a statement before get_line telling the operator to type a message. put ("Please type a message then press Enter key: ");