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.67.3.34 with SMTP id bt2mr6531879pad.16.1392478038712; Sat, 15 Feb 2014 07:27:18 -0800 (PST) X-Received: by 10.140.26.47 with SMTP id 44mr242046qgu.9.1392478038656; Sat, 15 Feb 2014 07:27:18 -0800 (PST) Path: border2.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!uq10no22058205igb.0!news-out.google.com!s3ni20101qas.0!nntp.google.com!f11no21018664qae.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 15 Feb 2014 07:27:18 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=78.141.136.55; posting-account=sDyr7QoAAAA7hiaifqt-gaKY2K7OZ8RQ NNTP-Posting-Host: 78.141.136.55 References: <4a3e55f6-9f54-4084-9f37-96efd4b0d349@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Something I don't understand From: Laurent Injection-Date: Sat, 15 Feb 2014 15:27:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Original-Bytes: 2346 Xref: number.nntp.dca.giganews.com comp.lang.ada:184877 Date: 2014-02-15T07:27:18-08:00 List-Id: Hi > Yes, because that's how the *procedure* Get_Line is defined. It stops reading when it reaches the end of >the string, or the end of the line. (RM A.10.7(18-20)) This would explain why an IF condition on Count > MaxName never activated. >It should be mentioned that in the OP's version the extra >characters aren't discarded. They're still there to be "gotten" on the >next use of Get or Get_Line. As Mr. Beneschan hinted in his comment >above, if you want to get rid of them you need to call Skip_Line. Yes I know, thats why I put a Skip_Line to prevent the extra chars from getting catcher from the following input procedure which expects an enumeration. > The chars that are to much are just ignored. I thought that as I get an Constraint_Error for not entering a char at all, Get_Line would also complain if the String entered is too long. Because Strings are 1D Arrays. Thats why I asked. Thanks for the example. I think I will use it, even if it is not really necessary. Could be useful later in my own program. There are still a lot of things I have to learn. Thank you very much. Laurent