Lazarus
Free Pascal => General => Topic started by: Bart on February 04, 2019, 06:56:25 pm
-
Hi,
Does freepascal have a generic set type, by which I mean a type that supports all set operators and the "set" can consist of any type (not just ordinals), so you can have a set of DWORDs, strings, objects, vectors you name it?
Bart
-
have you tried THashSet<T> in generics.collections?
-
The NOT operator of sets causes a true set to be quite narrow..
-
have you tried THashSet<T> in generics.collections?
I don't use fpc trunk ATM.
But would that allow syntax like ASet := ASet + [AMember]?
Bart
-
But would that allow syntax like ASet := ASet + [AMember]?
nope but it has methods to do similar set operations like UnionWith, IntersectWith, ExceptWith and so on.