A
Andrew Arro
is it possible to make smth like a loop of macroses? i.e. i want some
macros to be called X times, all that on the PREPROCESSOR lever
i was trying smth like
#define vv_0 100
#define vv_1 101
#define vv_2 102
#define vv_3 103
#define vv_4 104
#define RUN(cur, max) \
#if cur<max \
printf("%d %d\n", cur, vv_ ## cur); \
RUN((cur+1), max) \
#endif
but seems like #if is not possible inside of a macros?
macros to be called X times, all that on the PREPROCESSOR lever
i was trying smth like
#define vv_0 100
#define vv_1 101
#define vv_2 102
#define vv_3 103
#define vv_4 104
#define RUN(cur, max) \
#if cur<max \
printf("%d %d\n", cur, vv_ ## cur); \
RUN((cur+1), max) \
#endif
but seems like #if is not possible inside of a macros?