Paul Isaacs wrote:
I would like to do a binary search on a set of keywords whose value is specified in a "TokenTypes" enumeration. The range of the array that stores the keywords and their value is the enumeration.
Is it possible to compute the enumeration that is midway between two other enumerations? In other words is it possible to find an enumeration from its "ord" value?
Yes, see two argument versions of succ and pred.