Re: Named arguments in C

Liste des GroupesRevenir à cl c 
Sujet : Re: Named arguments in C
De : ifonly (at) *nospam* youknew.org (Opus)
Groupes : comp.lang.c
Date : 04. Jul 2024, 10:45:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v65qvv$2n43t$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 02/07/2024 21:50, bart wrote:
On 02/07/2024 20:39, Blue-Maned_Hawk wrote:
int main(void)
{
    f(.i = 0, .j = 2, .l = 2.5, .k = "foo", .n = 4.2, .m = 2.5);
}
 This addresses a small part of it. Named parameters allow arguments to be omitted, and that requires also default values to be defined.
It actually allows parameters to be omitted, since one can omit struct members. And it also gets default values for these, but it's a fixed one, zero. So, that's limited. But possibly useful.
Not that I find obfuscating basic C syntax, like argument passing, behind a macro a good idea. But hey.

Date Sujet#  Auteur
21 Mar 24 * Re: Block Comments Or Rest-Of-Line Comments?30Lawrence D'Oliveiro
22 Mar 24 `* Re: Block Comments Or Rest-Of-Line Comments?29David Brown
22 Mar 24  +- Re: Block Comments Or Rest-Of-Line Comments?1Blue-Maned_Hawk
23 Mar 24  +* Re: Block Comments Or Rest-Of-Line Comments?5Lawrence D'Oliveiro
23 Mar 24  i+* Re: Block Comments Or Rest-Of-Line Comments?2Chris M. Thomasson
23 Mar 24  ii`- Re: Block Comments Or Rest-Of-Line Comments?1Lawrence D'Oliveiro
23 Mar 24  i`* Re: Block Comments Or Rest-Of-Line Comments?2David Brown
23 Mar 24  i `- Re: Block Comments Or Rest-Of-Line Comments?1Malcolm McLean
2 Jul 24  `* Named arguments in C22Ivan Farlenkov
2 Jul 24   +* Re: Named arguments in C12Blue-Maned_Hawk
2 Jul 24   i+* Re: Named arguments in C4Richard Harnden
3 Jul 24   ii`* Re: Named arguments in C3Blue-Maned_Hawk
4 Jul 24   ii `* Re: Named arguments in C2Richard Harnden
4 Jul 24   ii  `- Re: Named arguments in C1Kaz Kylheku
2 Jul 24   i`* Re: Named arguments in C7bart
2 Jul 24   i +- Re: Named arguments in C1Keith Thompson
3 Jul 24   i +* Re: Named arguments in C4Blue-Maned_Hawk
4 Jul 24   i i`* Re: Named arguments in C3bart
4 Jul 24   i i `* Re: Named arguments in C2Keith Thompson
4 Jul 24   i i  `- Re: Named arguments in C1Kaz Kylheku
4 Jul 24   i `- Re: Named arguments in C1Opus
3 Jul 24   +- Re: Named arguments in C1Lawrence D'Oliveiro
4 Jul 24   `* Re: Named arguments in C8Bonita Montero
4 Jul 24    +* Re: Named arguments in C2Michael S
4 Jul 24    i`- Re: Named arguments in C1Michael S
4 Jul 24    `* Re: Named arguments in C5bart
4 Jul 24     `* Re: Named arguments in C4Bonita Montero
4 Jul 24      +- Re: Named arguments in C1Bonita Montero
4 Jul 24      `* Re: Named arguments in C2bart
4 Jul 24       `- Re: Named arguments in C1Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal