"DrPi" <314@drpi.fr> wrote in message news:umjuvc$9sp$2@rasp.pasdenom.info... > Le 28/12/2023 à 14:53, DrPi a écrit : >> Iterate the Map and temporarily store the key nodes to be deleted then >> delete the nodes from the key list ? > > Not clear. Rephrasing it. > Using 2 steps by iterating the Map and temporarily store the keys of nodes > to be deleted then delete the Map nodes using the key list ? If the keys are messy to save (as say with type String), it might be easier to save the cursor(s) of the nodes to delete. You would probably want to use a cursor iterator (that is, "in") to get the cursors. Code would be something like (declarations of the Map and List not shown, nor is the function Need_to_Delete which is obviously application specific, Save_List is a list of cursors for My_Map, everything else is standard, not checked for syntax errors): Save_List.Empty; -- Clear list of saved cursors. -- Find the nodes of My_Map that we don't need. for C in My_Map.Iterate loop if Need_to_Delete (My_Map.Element(C)) then Save_List.Append (C); -- else no need to do anything. end if; end loop; -- Delete the cursors of the nodes we don't want anymore. for C of Save_List loop My_Map.Delete(C); end loop; Randy.