InRange: Boolean;
ManagerType: TManagerType;
...
InRange := ManagerType in [Low(TManagerType)..High(TManagerType)];
As noted by Nikolai O. - while the Boolean expression above directly corresponds to:
(Low(TManagerType) <= ManagerType) and (ManagerType <= High(TManagerType))
Compilerdoes not perform optimization when checking membership against immediate dialing based on one subband. Thus, [mature] optimized code will be less elegant.
source
share