TFPGMap

From Free Pascal wiki
Revision as of 18:35, 13 November 2022 by Alextp (talk | contribs)
Jump to navigationJump to search

TFPGMap is part of the FGL (Free Generics Library).

Here is an example provided by forum user Remy Lebeau:

uses
  ..., fgl;
 
var
  Dict: TFPGMap<string, integer>;
  Value: Integer;
begin
  Dict := TFPGMap<string, integer>.Create;
  try
    Dict.Add('VarName', 99);
    ...
    Value := Dict['VarName'];
    ...
  finally
    Dict.Free;
  end;
end;

See also