Sujet : Re: is it possible to have functions with 0, 1, or 2 args?
De : richard.nospam (at) *nospam* gmail.invalid (Richard Harnden)
Groupes : comp.lang.cDate : 12. Aug 2024, 09:33:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9chcl$37e8f$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 12/08/2024 06:20, Tim Rentsch wrote:
Michael S <already5chosen@yahoo.com> writes:
On Mon, 05 Aug 2024 08:26:04 +0000
Mark Summerfield <mark@qtrac.eu> wrote:
>
According to my understanding, vararg functions without arguments will
become possible in C23. But since fully functional C23 compilers do not
exist yet, right now the answer to your question is "No".
Even in C99 varargs functions can be called without arguments.
The question here is more subtle. In fact it is possible even
in C99 and C11 to do what he wants, but it isn't easy, and it
is far from obvious how to go about it. Still, if the question
is "can this be done?", the answer is Yes even now.
How does va_start know where to, um, start from if there's no last named argument?
Date | Sujet | # | | Auteur |
5 Aug 24 | is it possible to have functions with 0, 1, or 2 args? | 15 | | Mark Summerfield |
5 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Stefan Ram |
5 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 4 | | Stefan Ram |
5 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 2 | | Stefan Ram |
8 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Lawrence D'Oliveiro |
11 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Tim Rentsch |
5 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 6 | | Michael S |
12 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 5 | | Tim Rentsch |
12 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 4 | | Richard Harnden |
12 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 3 | | Tim Rentsch |
12 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 2 | | Richard Harnden |
13 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Tim Rentsch |
5 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Stefan Ram |
5 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Blue-Maned_Hawk |
12 Aug 24 | Re: is it possible to have functions with 0, 1, or 2 args? | 1 | | Tim Rentsch |