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@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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to