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.36.89.146 with SMTP id p140mr10786951itb.35.1516042509994; Mon, 15 Jan 2018 10:55:09 -0800 (PST) X-Received: by 10.157.11.180 with SMTP id 49mr716300oth.5.1516042509928; Mon, 15 Jan 2018 10:55:09 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no1816755ita.0!news-out.google.com!b73ni15835ita.0!nntp.google.com!g80no2279962itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 15 Jan 2018 10:55:09 -0800 (PST) In-Reply-To: <51e64525-b9f1-4ad9-b737-5bb89f84f40f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <51e64525-b9f1-4ad9-b737-5bb89f84f40f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: ADA.STRINGS.INDEX_ERROR : a-strunb.adb:782 From: Shark8 Injection-Date: Mon, 15 Jan 2018 18:55:09 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 4034233827 X-Received-Bytes: 2559 Xref: reader02.eternal-september.org comp.lang.ada:49928 Date: 2018-01-15T10:55:09-08:00 List-Id: On Monday, January 15, 2018 at 5:00:21 AM UTC-7, Mehdi Saada wrote: > That's an awful lot of things at once x_x, but thanks. So in linux I have to go past the "./doinstall" script, right... Never used specific compilation option for anything until now. > > > When deleting elements of a list by position the loop must run positions > >in reverse: > >[...] > >That will keep the positions straight. Position /= index, BTW. > >However, deleting characters from a string almost never has sense. You > >probably should reconsider the algorithm. > > Ah ? Why so ? And how come position =/ index ? "IND" is the same, isn't ? Performance consideration ? But fine, I'll do without. The reason position isn't index can be simply illustrated with the following array: Example : Array( 11..15 ) of Boolean := (True, False, False, True); In the above, position #1 is True, #2 & #3 are False, and #4 is True. HOWEVER, position #1 is index 11, #2 is index 12, etc. (There's also Offset, which is actually why C programmers seem to be enamored with 0-based indexing; but it only shows they conflate index, position, and offset.)