Re: Bounds Checking

From: George Greer (greerga@circlemud.org)
Date: 08/19/99


On Thu, 19 Aug 1999, Chuck Carson wrote:

>I need to do some bounds checking where the valid values
>are the number 0, and the lower case letters a-z. (upper
>case letters are converted prior to entering this function so
>I do not need to worry about that)

If you're guaranteed ASCII-like, then do:

(*letter >= 'a' && *letter <= 'z') || *letter == '0'

--
George Greer
greerga@circlemud.org


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST