The chINRANGE, chDIMOF, and chSIZEOFSTRING Macros

[Previous] [Next]

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.



Programming Server-Side Applications for Microsoft Windows 2000
Programming Server-Side Applications for Microsoft Windows 2000 (Microsoft Programming)
ISBN: 0735607532
EAN: 2147483647
Year: 2000
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net