Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Sort char array Date: Mon, 14 Oct 2019 08:17:10 -0700 Organization: A noiseless patient Spider Lines: 13 Message-ID: <86imor73wp.fsf@linuxsc.com> References: <5alnF.1041354$WI2.353384@fx34.am4> <87tv8ggaxh.fsf@bsb.me.uk> <87mue8fx7b.fsf@bsb.me.uk> <1QInF.797536$aq7.506537@fx09.am4> <875zkwf27e.fsf@bsb.me.uk> <87a7a66eyk.fsf@bsb.me.uk> <6%ioF.849405$893.123190@fx02.am4> <20191014013916.333bfd71e8363156058a1b2e@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="d0509592842f78811f1490d2ec487131"; logging-data="32393"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+exsGYONUgC2yVYk3poxVNoHDXfYJWAYM=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:bShu2k+dNn4xlRVdGcSLiI45EBw= sha1:NIdBmc2jaaC3dH7Mh0yg1KZWetQ= Xref: csiph.com comp.lang.c:146953 Anton Shepelev writes: > Can C's va_arg facilily be extended with the ability to > query the type of each argument rather than to require it? > This would make it possible to implement a typed tprintf() > without type specifiers: > > tprintf( "My name is %, and I am % years old.\n", "Bob", 8 ); This example, and others like it, can already be done in standard C11 using _Generic and variadic macros (and of course defining an underlying function to do the actual printing). No extension to varargs is needed.