ActiveResourceKit
v1.2 (498.0)
|
#import <Foundation/Foundation.h>
Go to the source code of this file.
Macros | |
#define | ARDimOf(array) (sizeof(array)/sizeof((array)[0])) |
Answers the number of elements in the given array, the array's dimension. | |
#define ARDimOf | ( | array | ) | (sizeof(array)/sizeof((array)[0])) |
Answers the number of elements in the given array, the array's dimension.
array | A standard C array of fixed-sized elements. |
Assumes that the array argument is a standard C-style array where the compiler can assess the number of elements by dividing the size of the entire array by the size of its elements; the answer always equals an integer since array size is a multiple of element size. Both measurements must be static, otherwise the compiler cannot supply a fixed integer dimension. The implementation wraps the argument in parenthesis in order to enforce the necessary operator precedence.
Definition at line 40 of file ARMacros.h.