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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,146ef816afa699d1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.136.216 with SMTP id s24mr2302988bkt.5.1318880891874; Mon, 17 Oct 2011 12:48:11 -0700 (PDT) Path: l23ni10950bkv.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Length of unbounded_string. Date: Mon, 17 Oct 2011 21:49:13 +0200 Organization: Tidorum Ltd Message-ID: <9g3f3kFfr7U1@mid.individual.net> References: <4e9a9a6d$0$3238$703f8584@news.kpn.nl> <9fvo6aF3d6U1@mid.individual.net> <4e9ad365$0$3267$703f8584@news.kpn.nl> <9g02plFrnlU1@mid.individual.net> <4e9bdbc7$0$3240$703f8584@news.kpn.nl> Mime-Version: 1.0 X-Trace: individual.net h60xbhkieFQwiZbK+QViiAt0J4IPkMLM4NbuE9v7nvdHoxWBJg Cancel-Lock: sha1:vLonCm17LBrEgRNty9OvluTtFaU= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 In-Reply-To: <4e9bdbc7$0$3240$703f8584@news.kpn.nl> Xref: news1.google.com comp.lang.ada:18524 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2011-10-17T21:49:13+02:00 List-Id: On 11-10-17 09:39 , ldries46 wrote: > I have to strings I want to concatenate with a space in between. The > first (str) ends with a ','. > The output seems to be a concatenation where the ',' is missing. > A can see with the debugging facilities that before the concatenation > there is a ',' and after the concatenation depending on the type of > facility I use the comma is present (debug\print) or is not > (debug\display). And what happens if you simply print it with Ada.Text_IO? In my experience, gdb sometimes (well, rather often) prints complex Ada structures incorrectly or incompletely. > The last one is consistent with the display of the line in a gtk window. > For further use I need that comma, but I cannot add it explicitly > because as can beseen in the code I can reach rhat code also in some > other cases. Of course you could divide the code inte more cases, separating the comma case from the other cases. > > L. Dries > "Niklas Holsti" schreef in bericht news:9g02plFrnlU1@mid.individual.net... > > On 11-10-16 14:52 , ldries46 wrote: >> Sorry I just thought to simplify the problem but did that the wrong way >> my real problem is in the following code: >> >> ch := Element(str, len); >> if ch = ',' or (ch /= ';' and ch /= '{' and ch /= '}') then >> nr := nr + 1; >> str := str & " " & Next_Line; That code is incomplete. Where is the "end if"? If you want more help, please try to make a small, self-contained example in which the problem occurs, and show the whole code. >> >> where in the first line >> print str.reference.data >> $24 = "static void gtk_print_job_set_property (GObject *object", ',' Why is gdb speaking of GObject? I tought "str" was mean to be Ada.Strings.Unbounded.Unbounded_String, not some Gtk type. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .