Liste des Groupes | Revenir à cl c |
On 10/04/2025 11:07, Muttley@DastardlyHQ.org wrote:On Thu, 10 Apr 2025 09:53:40 +0200>
David Brown <david.brown@hesbynett.no> wibbled:On 09/04/2025 21:11, bart wrote:The sets of parameter names are all different (and that's in the same>
file!); which is the official set?
C has had flexibility here for all sorts of reasons. But if named
parameters were to be added to the language without significant extra
syntax, then this particular issue could be solved in at least two very
simple ways. Either say that named parameter syntax can only be used if
Anyone who really wants named parameters at function calling can already do
this in C99:
struct st
{
int a;
int b;
int c;
};
void func(struct st s)
{
}
int main()
{
func((struct st){ .a = 1, .b = 2, .c = 3 });
return 0;
}
Ha, ha, ha!
>
Those aren't named parameters. It would be a dreadful solution anyway:
* Each function now needs an accompanying struct
Les messages affichés proviennent d'usenet.