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=ham 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.68.11.199 with SMTP id s7mr24363142pbb.5.1318837201547; Mon, 17 Oct 2011 00:40:01 -0700 (PDT) Path: d5ni20519pbc.0!nntp.google.com!news2.google.com!goblin3!goblin2!goblin1!goblin.stu.neva.ru!feeder.news-service.com!ramfeed-2.ams.xsnews.nl!feed.xsnews.nl!border-1.ams.xsnews.nl!upload-2.xsnews.nl!10.10.69.14.MISMATCH!frontend-F09-14.ams.news.kpn.nl From: "ldries46" Newsgroups: comp.lang.ada References: <4e9a9a6d$0$3238$703f8584@news.kpn.nl> <9fvo6aF3d6U1@mid.individual.net> <4e9ad365$0$3267$703f8584@news.kpn.nl> <9g02plFrnlU1@mid.individual.net> In-Reply-To: <9g02plFrnlU1@mid.individual.net> Subject: Re: Length of unbounded_string. Date: Mon, 17 Oct 2011 09:39:43 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 Message-ID: <4e9bdbc7$0$3240$703f8584@news.kpn.nl> Organization: KPN.com NNTP-Posting-Host: 77.168.179.107 X-Trace: 1318837191 news.kpn.nl 3240 77.168.179.107@kpn/77.168.179.107:63714 Xref: news2.google.com comp.lang.ada:13997 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit Date: 2011-10-17T09:39:43+02:00 List-Id: 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). 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. 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; And what *is* your problem with this code? I don't understand the gdb mess below, or what your are trying to show with it. Can you explain the problem in Ada terms, without digging into the internals of Unbounded_String? > > where in the first line > print str.reference.data > $24 = "static void gtk_print_job_set_property (GObject *object", ',' > , > "["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]" > > len = 56 > ch = ',' in fact the first > print str.reference.data > $386 = "static void gtk_print_job_set_property (GObject *object, guint", > ' ' , > "prop_id,["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]" > > in the display option instead of rhe print option this shows as > "static void gtk_print_job_set_property (GObject *object guint", ' ' > , > "prop_id,["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]["0d"]["f0"]["ad"]["ba"]" > > and when I save that line later on the comma after object is also > disapperared > > L. Dries -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .