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.144.135 with SMTP id z7mr149299bku.1.1318769977193; Sun, 16 Oct 2011 05:59:37 -0700 (PDT) Path: l23ni6154bkv.0!nntp.google.com!news1.google.com!news4.google.com!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: Sun, 16 Oct 2011 15:00:35 +0200 Organization: Tidorum Ltd Message-ID: <9g02plFrnlU1@mid.individual.net> References: <4e9a9a6d$0$3238$703f8584@news.kpn.nl> <9fvo6aF3d6U1@mid.individual.net> <4e9ad365$0$3267$703f8584@news.kpn.nl> Mime-Version: 1.0 X-Trace: individual.net 5WQReFreapgxZkc8LBGLVgt0zdfNw8V582i4w12aPpnsHFl88S Cancel-Lock: sha1:QHGBR+3Dl1yHTBqLLIdJsy2JOb4= 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: <4e9ad365$0$3267$703f8584@news.kpn.nl> Xref: news1.google.com comp.lang.ada:18490 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2011-10-16T15:00:35+02:00 List-Id: 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 . @ .