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 autolearn=unavailable autolearn_force=no version=3.4.4 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!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: confusing string error Date: Fri, 14 Feb 2014 14:03:24 +0100 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87ha81u9r7.fsf@adaheads.sparre-andersen.dk> References: NNTP-Posting-Host: monowall.adaheads.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: loke.gir.dk 1392383005 3818 86.48.41.195 (14 Feb 2014 13:03:25 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 14 Feb 2014 13:03:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:9aDPpJoImf+XtQWuUKjx9nRig+A= Xref: news.eternal-september.org comp.lang.ada:18553 Date: 2014-02-14T14:03:24+01:00 List-Id: agent@drrob1.com writes: > Code fragment: > > type FSATyp is (delim, op, dgt, allelse); > type TokenType is record > Ustr : unbounded_string; > State : FSATyp; > delimCH : Character; > delimstate : FSATyp; > end record; > > ch: character; > > begin > ... > > Token.uStr := null_unbounded_string; > > ch now contains a plus sign, or an asterisk > Token.uStr := Token.uStr & ch > > this last line fails with error Ada.Strings.INDEX_ERROR You haven't provided enough information to compile and evaluate your example. Greetings, Jacob -- »You know the world has gone crazy when the best rapper is a white guy, the best golfer is a black guy, the swiss hold the America's cup, France is accusing the U.S. of arrogance, and Germany doesn't want to go to war«