Deutsch English Français Italiano |
<v65qvv$2n43t$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Opus <ifonly@youknew.org> Newsgroups: comp.lang.c Subject: Re: Named arguments in C Date: Thu, 4 Jul 2024 11:45:34 +0200 Organization: A noiseless patient Spider Lines: 16 Message-ID: <v65qvv$2n43t$1@dont-email.me> References: <utgjh0$21nsq$2@dont-email.me> <uth66l$266da$1@dont-email.me> <uti83u$2ed01$4@dont-email.me> <utjhfn$2r0cr$1@dont-email.me> <v61bbh$1n9ij$1@dont-email.me> <pan$1e5a0$ef4a1faf$e6cedebc$3f30bac1@invalid.invalid> <v61lm8$1p1gs$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 04 Jul 2024 11:45:35 +0200 (CEST) Injection-Info: dont-email.me; posting-host="4802ed54b4c11cbf91c2564406b8ad6e"; logging-data="2855037"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QB3e3B/a6Fn0t5J3d+TzM" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:DAbOdpkyVhj9RoC0t+a6au/uFRg= In-Reply-To: <v61lm8$1p1gs$1@dont-email.me> Content-Language: en-US Bytes: 1846 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.