comp.lang.ada
 help / color / mirror / Atom feed
* Re: Length of unbounded_string.
@ 2011-10-25  9:37 ldries46
  2011-10-25 17:57 ` Jeffrey Carter
  2011-10-25 20:23 ` Vadim Godunko
  0 siblings, 2 replies; 33+ messages in thread
From: ldries46 @ 2011-10-25  9:37 UTC (permalink / raw)


I just found the following  extra relevant points:
Instead of <Str := Str & " " & Next_Line;> I put in the line <Str := Str & 
"x " & Next_Line;>
This showed that  with Str := "str," en Next_Line := "Next" the output 
became  "str x Next"
When I changed Str to Str := "strx" the output changed  to "strxx Next"
This looks like the comma has a special meaning within an Unbounded String

ldries46




^ permalink raw reply	[flat|nested] 33+ messages in thread
* Length of unbounded_string.
@ 2011-10-16  8:48 ldries46
  2011-10-16  9:59 ` Niklas Holsti
  2011-10-16 10:14 ` Vinzent Hoefler
  0 siblings, 2 replies; 33+ messages in thread
From: ldries46 @ 2011-10-16  8:48 UTC (permalink / raw)


In my program I use unbounded_string str

I want to change the last character of the string using the program lines

2205  len := Length(str);
2206  Replace_Slice(str, len, len, "G");

Then I get the following message printed in my exception part of the program

Error type    : CONSTRAINT_ERROR
In phase      : Step 1
in function   : Continuation
Error info    : trans2ada.adb:2206 range check failed

file line nr  :  1
Original line : /* GtkPrintJob
Next line     :  * Copyright (C) 2006 John (J5) Palmieri  <johnp@redhat.com>

In this print out the Original line represents "str".

Is there a problem with the Length function or do I interpret something 
wrong?

I use the GNAT GPS environment :
GPS 5.0.1 (20110113) hosted on i686-pc-mingw32
GNAT GPL 2011 (20110428)

L. Dries 




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

end of thread, other threads:[~2011-11-01 18:22 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25  9:37 Length of unbounded_string ldries46
2011-10-25 17:57 ` Jeffrey Carter
2011-10-28  2:54   ` ldries46
2011-10-28  4:55     ` Jeffrey Carter
2011-10-25 20:23 ` Vadim Godunko
2011-10-25 21:28   ` Simon Wright
2011-10-26  4:41     ` Simon Wright
2011-10-26 22:47     ` Randy Brukardt
2011-10-27  8:05       ` AdaMagica
2011-10-27  8:56       ` Simon Wright
2011-10-27 11:05         ` Brian Drummond
2011-10-28  3:12           ` ldries46
     [not found]           ` <4eafc489$0$3081$703f8584@textnews.kpn.nl>
2011-11-01 18:22             ` Jeffrey Carter
2011-10-27 11:28         ` Georg Bauhaus
2011-10-27 12:17           ` Dmitry A. Kazakov
2011-10-27 13:31             ` Georg Bauhaus
2011-10-27 14:34               ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2011-10-16  8:48 ldries46
2011-10-16  9:59 ` Niklas Holsti
2011-10-16 12:06   ` ldries46
2011-10-16 12:52   ` ldries46
2011-10-16 13:00     ` Niklas Holsti
2011-10-17  7:39       ` ldries46
2011-10-17 19:49         ` Niklas Holsti
2011-10-18 11:47           ` ldries46
2011-10-18 17:54             ` Niklas Holsti
2011-10-19  2:38               ` ldries46
2011-10-19  6:07                 ` Niklas Holsti
2011-10-24 15:10                   ` ldries46
2011-10-19  6:37                 ` Simon Wright
2011-10-19 14:48                 ` Alex Mentis
2011-10-24 17:04                   ` ldries46
2011-10-16 10:14 ` Vinzent Hoefler

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