P99
Variable Length Arrays
Preprocessor FOR loops | Preprocessor arithmetic operations | C Programming facilities

join a list with a specific token given as first argument More...

+ Collaboration diagram for Variable Length Arrays:

join a list with a specific token given as first argument

Examples

 P99_TOKJOIN(+, 1, 2, 3)  ->  1+2+3
 P99_TOKJOIN(., f(), a, length)  ->  f().a.length
Warning:
argument 0 of P99_TOKJOIN may be evaluated multiple times

Revert the argument list

Generate the quotient of non-negative decimal numbers A and B at preprocessing time.

Warning:
Both arguments must be less than the maximum argument list number that is supported, currently 64.

Compute an absolute index in a multidimensional array with the same function as C would do that.

If we have N arguments after NAME, NAME must be an array of type

 size_t NAME[N];

that hold the side lengths of an N dimensional cube. E.g

 size_t const D[] = { 3, 4, 7 };

corresponds to a cube of side length 3 in dimension 0, 4 in dimension 1 and 7 in dimension 2, with in total 84 elements. With that, we get

 P99_CDIM(D, 1, 2, 3)  =>  ((3) + ((D)[2] * ((2) + ((D)[1] * (1)))))
 P99_CDIM(D, k0, k1, k2)  =>  ((k2) + ((D)[2] * ((k1) + ((D)[1] * (k0)))))
Warning:
argument 0 of P99_CDIM may be evaluated multiple times
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines