thank you but this is not as I want
1 2 3
|
S(); //print AT OK
S("TT"); //print TT OK
S("TT","KK"); //print TT KK
|
if S() should be print "AT", "OK"
if S("TT") should be print , first arg from S should replace template from macros so result, print "TT", "OK" // here OK because in the S only one arg
if S("TT","KK") then first arg should replace first default from macros and second the same and result print "TT", "KK" because S have two arguments
and very desired via macros
I can do this with 1,2 argument and nice not as in your link at stackoverflow with CONCAT but problem when 0 arg
w/o 0 arg we can do like this
#define S1(x, y, ...) printf("%s %s",(x),(y))
#define S(...) S1(__VA_ARGS__, "OK", "")