mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 14:48:18 +02:00
21 lines
245 B
ObjectPascal
21 lines
245 B
ObjectPascal
uses
|
|
fgl;
|
|
|
|
type
|
|
TEnum = (ta, tb, tc);
|
|
|
|
TMyMap = specialize TFPGMap<string, TEnum>;
|
|
|
|
var
|
|
map : TMyMap;
|
|
c : TEnum;
|
|
i : Longint;
|
|
|
|
begin
|
|
map := TMymap.Create();
|
|
map.sorted:=true;
|
|
map.Add('Hello', ta);
|
|
|
|
map.Find('Hello', i);
|
|
end.
|