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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5bbcbfbb228d6549,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!news.germany.com!news.motzarella.org!motzarella.org!not-for-mail From: =?ISO-8859-1?Q?S=E9bastien?= Newsgroups: comp.lang.ada Subject: Ada.Containers.Vectors Update_Element issue Date: Tue, 13 May 2008 17:26:40 +0000 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: feeder.motzarella.org U2FsdGVkX19TQ+pX3PwE6h1dRNOTv2qJYVLZzqW5ykshpyqbvnttFUPTG+GmPAcbISPUw2zI85b5KhKN5WTnvaWh1i7F5ikf2CsF472TMMjrucwAOybBengnZorsoWC5gxDhoo7CKqJxa5odWQ9wpA== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Tue, 13 May 2008 17:26:47 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+T0GoNvEkI/hjjIduhI2IbL6dGCSDHm3paI9zvbzQk9A== Cancel-Lock: sha1:ncJ5KuYWoBSDe/AVTmHaD3y+fkM= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) Xref: g2news1.google.com comp.lang.ada:55 Date: 2008-05-13T17:26:40+00:00 List-Id: Hi, I'm trying to use the Ada.Containers.Vectors librairies, but I don't know how to update element using a context. I have a list of element and I want to use Update_Element with a procecedure Update_Element_Process, however I want to add static argument to the Update_Element_Process. This could be something like : procedure My_Update(c: in out context; Element: in out Element_Type); and then procedure Update_All(c: in out context) is begin my_list.Update_Element(1, My_Update'Access); end; Because My_Update is not exacly the type Update_Element_Process it's nor working. type Update_Element_Process is access procedure (Element : in out Element_Type); Note that generic doesn't help : they give me a bug error compilation because of Address invalid of the generic instance. I tried this: generic c: Context; procedure My_Update_Generic(Element: in out Element_Type); procedure Update_All(c: in out context) is procedure My_Update is new My_Update_Generic(c => c); begin my_list.Update_Element(1, My_Update'Access); end; That's not working and I can understand it ;-) No dynamical address since the generic will instancied at runtime or something like that ... Thanks by advance if you have any clue to update a vector list using this way (because I could : get element, then update, then replace, but it's going to be really slower ...) S�bastien