Liste des Groupes | Revenir à cl c |
On 02/07/2024 20:39, Blue-Maned_Hawk wrote:That's the kind of thing Bonita would write.
I searched around a bit, and it seems like a more common way to
implement named arguments in C is with a pattern like this:
#define f(...) f_impl((struct f_struct){__VA_ARGS__})
void f_impl(struct f_struct { int i, j; char * k; double l, m, n; }
f_params)
{
/* actual code */
}
int main(void)
{
f(.i = 0, .j = 2, .l = 2.5, .k = "foo", .n = 4.2, .m = 2.5);
}
Horrible.
Les messages affichés proviennent d'usenet.