3 ms·
#define RANGE(type, name, last) type name = 0, last__ = (last); name != last__; name++ for (RANGE(i32, i, foo->count)) ... That solves the problem
by jstimpfle 4y ago
#define RANGE(type, name, last) type name = 0, last__ = (last); name != last__; name++
for (RANGE(i32, i, foo->count))
...
That solves the problem even in C. But why care much, typing a few plain loops isn't among the hard problems to solve.