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.31.73 with SMTP id y9mr5405247pbh.0.1318991917233; Tue, 18 Oct 2011 19:38:37 -0700 (PDT) Path: d5ni30100pbc.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!feed.xsnews.nl!border-1.ams.xsnews.nl!upload-2.xsnews.nl!10.10.69.10.MISMATCH!frontend-F09-10.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> <4e9bdbc7$0$3240$703f8584@news.kpn.nl> <9g3f3kFfr7U1@mid.individual.net> <4e9d6722$0$3244$703f8584@news.kpn.nl> <9g5snkFlh0U1@mid.individual.net> In-Reply-To: <9g5snkFlh0U1@mid.individual.net> Subject: Re: Length of unbounded_string. Date: Wed, 19 Oct 2011 04:38:17 +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: <4e9e37ea$0$3272$703f8584@news.kpn.nl> Organization: KPN.com NNTP-Posting-Host: 77.168.179.107 X-Trace: 1318991850 news.kpn.nl 3272 77.168.179.107@kpn/77.168.179.107:53378 Xref: news2.google.com comp.lang.ada:14074 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit Date: 2011-10-19T04:38:17+02:00 List-Id: The complete code of which I would conclude that the comma should be present is: -------------------------------------------------------------------------------- -- The procedure adds Lines together when a "," is the end of the line -- statements or when the end of the line is not a ";" or "{" or "}" -------------------------------------------------------------------------------- procedure Continuation(str : in out Unbounded_String; nr : in out integer) is len : integer; ch : character; ok : boolean := false; begin Proc_Stack.Push(To_Unbounded_String("Continuation")); -- a Stack procedure that is used for the error messages the program can produce while not ok loop len := Length(str); if len /= 0 then ch := Element(str, len); if ch = ',' or (ch /= ';' and ch /= '{' and ch /= '}') then nr := nr + 1; ch := Element(Next_Line, -- Next_LIne is a unbounded_string that can be connected to str while ch = ' ' or ch = ASCII.HT loop Replace_Slice(Next_Line, 1, 1, ""); ch := Element(Next_Line, 1); end loop; str := str & " " & -- After this statement the error is found by the display function of the GDB Original_Line := -- Original Line is only meant for the error messges if nr < Buffer1.Length - 1 -- Buffer1 is a buffer of unbounded_atring's thatis the source for as well str as Next_Line Next_Line := Buffer1.Get_Buffer( nr + -- nr is the line nr in the buffer where str is located else Next_Line := To_Unbounded_String(""); end if; else ok := true; end if; else ok := true; end if; end loop; Proc_Stack.Remove; -- Removes "continuation" from the stack end Continuation; The error is somewhere in this routine "Niklas Holsti" schreef in bericht news:9g5snkFlh0U1@mid.individual.net... On 11-10-18 13:47 , ldries46 wrote: > The program I am writing is a window oriented program. I am using GTKADA > for the windows. When I write the string to the window it also misses > the comma. > Also further on in the program before writing to the window I check for > the comma but the function I need to do is not performed so that is > another reason why I think the comma is not present. So, it is likely that the comma is absent. But I can't think about why it is absent, and whether this is a compiler/library erroror an error in your code, until you show the complete code that you think should make the comma present. Sorry, but I can do nothing more. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .