1: $cppawk ' #include BEGIN { print narg(x), narg(x, y), narg(x, y, z), narg(x, y, z, w) }' : 1 2 3 4 -- 2: $cppawk ' #include BEGIN { print narg(a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a) }' : 32 -- 3: $cppawk ' #include BEGIN { print narg(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) }' : ERR -- 4: $cppawk ' #include #define first(x) x #define rest(prev, x) prev : x #define colonize(...) [varexpand(first, rest, __VA_ARGS__)] #define str(x) #x #define xstr(x) str(x) #define scolonize(...) xstr(colonize(__VA_ARGS__)) BEGIN { print scolonize(1), scolonize(1,2), scolonize(1, 2, 3) }' : [1] [1 : 2] [1 : 2 : 3] -- 5: $cppawk ' #include #define str(x) #x #define xstr(x) str(x) #define srev(...) xstr((revarg(__VA_ARGS__))) BEGIN { print srev(1), srev(1,2), srev(1, 2, 3) }' : (1) (2, 1) (3, 2, 1) -- 5: $cppawk ' #include #define first(x) x #define rest(prev, x) prev : x #define colonize(...) [varexpand(first, rest, __VA_ARGS__)] #define str(x) #x #define xstr(x) str(x) #define scolonize(...) xstr(colonize(__VA_ARGS__)) #define scol(x, rest) scolonize(x, splice(rest)) BEGIN { print scol(1, (2, 3)) }' : [1 : 2 : 3]