How to compare sets of enumerated types
问题 From a certain point I got tired of writing set conditions ( and , or ), because for more conditions or longer variable names it begins to be clumsy and annoying to write all over again. So I started writing helpers so I could write ASet.ContainsOne([ceValue1, ceValue2]) instead of (ceValue1 in ASet) or (ceValue2 in ASet) . type TCustomEnum = (ceValue1, ceValue2, ceValue3); TCustomSet = set of TCustomEnum; TCustomSetHelper = record helper for TCustomSet function ContainsOne(ASet: TCustomSet):