On Sat, 3 Oct 2020, Mattias Gaertner via fpc-pascal wrote:
On Sat, 3 Oct 2020 15:53:58 +0200 (CEST)
Michael Van Canneyt via fpc-pascal
wrote:
On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote:
[...]
> Thanks. Sneaky that sorted had to be set to true. Not sure why that
> would be.
Beca
On Sat, 3 Oct 2020 15:53:58 +0200 (CEST)
Michael Van Canneyt via fpc-pascal
wrote:
> On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote:
>[...]
> > 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 Inde
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
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 wou
> On Oct 1, 2020, at 7:00 PM, Vojtěch Čihák via fpc-pascal
> 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.
Regards,
Ryan Joseph
__
Result := Count;
CopyKey(AKey, inherited Insert(Result));
end;
V.
__
Od: "Ryan Joseph via fpc-pascal"
Komu: "FPC-Pascal users discussions"
Datum: 02.10.2020 02:24
Předmět: [fpc-pascal] TFPGMapObject duplicate errors
I expected to get an assertion when I added the duplicate key "foo". What am I
doing wrong?
type
TSomeMap = specialize TFPGMapObject;
var
map: TSomeMap;
begin
map := TSomeMap.Create(true);
map.Duplicates := dupError;
map.Add('foo', TObject.Create);
map.Add('foo', TObject.Create);
Reg