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.42.82.79 with SMTP id c15mr16490879icl.7.1406998803791; Sat, 02 Aug 2014 10:00:03 -0700 (PDT) X-Received: by 10.50.44.18 with SMTP id a18mr309950igm.12.1406998803490; Sat, 02 Aug 2014 10:00:03 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h18no12666327igc.0!news-out.google.com!px9ni584igc.0!nntp.google.com!h18no12666317igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 2 Aug 2014 10:00:02 -0700 (PDT) In-Reply-To: <1059032952428685269.120133nonlegitur-futureapps.invalid@reader80.eternal-september.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=107.16.139.163; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 107.16.139.163 References: <1406989298.2959.306.camel@pascal.home.net> <1059032952428685269.120133nonlegitur-futureapps.invalid@reader80.eternal-september.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4b2947cb-3c64-4411-9633-5f4f77ecc35a@googlegroups.com> Subject: Re: trimming strings From: Adam Beneschan Injection-Date: Sat, 02 Aug 2014 17:00:03 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:21407 Date: 2014-08-02T10:00:02-07:00 List-Id: On Saturday, August 2, 2014 8:27:42 AM UTC-7, G. B. wrote: > >> subtype string255fixedtype is string (1.255); > >> inbuf : string255fixedtype; > >> BEGIN > >> inbuf := Get_Line; > >> inbuf := trim(inbuf,both); > >> -- this does not work, error is both is not visible > > Please post a complete example, there is many errors above, far to many > > to even pass the compilation. > > > one of these being likely that an array of 255 characters > is to receive a string object that may not have that many > due to trimming. That's definitely an error (and assigning a string with a known length to Get_Line won't work either). But those won't cause errors at compile time. They will result in exceptions at run time. -- Adam