comp.lang.ada
 help / color / mirror / Atom feed
* confusing string error
@ 2014-02-14 12:38 agent
  2014-02-14 13:03 ` Jacob Sparre Andersen
  0 siblings, 1 reply; 13+ messages in thread
From: agent @ 2014-02-14 12:38 UTC (permalink / raw)


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

I don't understand this.  

When ch has a digit or an alphabetic character this code works.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-02-17 12:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 12:38 confusing string error agent
2014-02-14 13:03 ` Jacob Sparre Andersen
2014-02-15  0:46   ` agent
2014-02-15  1:50     ` adambeneschan
2014-02-15  8:41       ` Simon Wright
2014-02-15  1:57     ` adambeneschan
2014-02-15  9:33     ` Simon Wright
2014-02-15 12:53       ` agent
2014-02-15 16:58         ` adambeneschan
2014-02-15 18:29           ` Simon Wright
2014-02-17 12:57             ` agent
2014-02-15 13:15       ` agent
2014-02-15 17:56         ` Jeffrey Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox