yes, I am sick of inconsistent support for variable argument functions, and the annoying fact that in many cases u need 2 version of variable argument fucntions (one with (...) and another with (va_list)).
I only ever needed var arg functions for string operations, parsing and logging. so again I got rid of using (...) once and for all ( ? ).
The results look like this:
QUOTE:
//standard varibale arg
fct(L"Hello %f, %d", f, i);
//new way (for logging per example)
P_EL args=("Hello ", f, ', ', i, P_END());
fct(args);
//new way (parsing example)
P_EL args=("Hello ", &f, ', ', &i, P_END());
fct("Hello -2.6,66", args);
//standard varibale arg
fct(L"Hello %f, %d", f, i);
//new way (for logging per example)
P_EL args=("Hello ", f, ', ', i, P_END());
fct(args);
//new way (parsing example)
P_EL args=("Hello ", &f, ', ', &i, P_END());
fct("Hello -2.6,66", args);
Thats as comfortable as i was able to make it, and i like it ...
u can of course also setup a dynamic P_EL array at runtime.








on August 11, 2006, 7:49 pm
Reply to this comment