I frequently use the handy chINRANGE, chDIMOF, and chSIZEOFSTRING macros in my applications. The first one, chINRANGE, checks to see whether a value is between two other values. The second macro, chDIMOF, simply returns the number of elements in an array. It does this by using the sizeof operator to first calculate the size of the entire array in bytes. It then divides this number by the number of bytes required for a single entry in the array. The third macro, chSIZEOFSTRING, returns the number of bytes occupied by a zero-terminated string.