[fpc-pascal] TFPGMapObject duplicate errors
    Michael Van Canneyt 
    michael at freepascal.org
       
    Sat Oct  3 15:53:58 CEST 2020
    
    
  
On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote:
>
>
>> On Oct 1, 2020, at 7:00 PM, Vojtěch Čihák via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>> 
>> I looked to code, it gives error only when map is Sorted=True.
>> 
>
> Thanks. Sneaky that sorted had to be set to true. Not sure why that would be.
Because otherwise it would take a linear search to do IndexOf whenever you
insert/append an element in the list.
It is in fact documented, so you know:
https://www.freepascal.org/docs-html/current/rtl/fgl/tfpsmap.duplicates.html
Michael.
    
    
More information about the fpc-pascal
mailing list