A preprocessor pseudo iterator.
 Parameters

NAME  a name or other data that is visible to all iterations 
N  the number of times the iteration is to be done 
OP  an operation that is performed to glue the different results of the individual iterations together 
FUNC  a function that is applied in each iteration 
In each iteration, FUNC will be called as FUNC(NAME, X, I)
. Here NAME is the same as the argument to P99_FOR. I
is the ordinal number of this iteration step, starting from 0. X
is the Ith
argument from the remaining argument list of this invocation of P99_FOR.
OP is called for iterations 1 to N  1 to glue the results of the N iterations together. It is called in the form OP(NAME, I, REC, RES), where NAME and I
are as before. REC
is the result of all iterations with index less than I
, RES
is the result of the current iteration.
#define P00_SEP(NAME, I, REC, RES) REC; RES
#define P00_VASSIGN(NAME, X, I) X = (NAME)[I]
P99_FOR(A, 2, P00_SEP, P00_VASSIGN, toto, tutu);
Will result in
toto = (A)[0]; tutu = (A)[1];
To understand the associativity of the OP argument
#define P00_SUM(NAME, I, REC, RES) ((REC) + (RES))
#define P00_IDT(NAME, X, I) X
P99_FOR(A, 2, P00_SUM, P00_IDT, a, b,
c)
Will result in
 Warning
 argument 0 may be evaluated multiple times
Definition at line 84 of file p99_for.h.