Define FOR_EACH¶
Defined in File common.h
Define Documentation¶
-
FOR_EACH
(ELEM, ELEMS)¶ For-each loop, iterates across an array or slice. For example:
Will printnewarray(IntArray, int); IntArray xs = AMAKE(IntArray, 5); int elem1 = 5; int elem2 = 3; push(&xs, &elem1, sizeof(int)); push(&xs, &elem2, sizeof(int)); FOR_EACH(x, xs) { printf("%d\n", *x); }
5
then3
.