Re: Thanks

Waldek Hebisch <[email protected]> Mon, 7 Mar 2016 17:07:47 +0100 (CET)
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
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.

-- 
                              Waldek Hebisch

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc