Berkeley CSUA MOTD:Entry 28069
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/06/02 [General] UID:1000 Activity:popular
6/2     

2003/4/10-11 [Uncategorized] UID:28069 Activity:high
4/10    Question related to the ellipsis discussion below: what is the
        practical difference between using myprintf(char *fmt, ...) and
        myprintf(char *fmt, va_list list)? They seem to do the same thing.
        \_ va_list is necessary if you want your function to be called by
           other variable-argument functions.
           See http://www.eskimo.com/~scs/C-faq/q15.12.html
           --jameslin
        \_ K&R:  func(char *fmt, va_list list)
           ANSI: func(char *fmt, ...)
           Use the ANSI style.
           \_ This person is completely wrong.  va_list is ANSI for
              passing a vararg list.  Btw pokemon sapphire is great. -pld
Cache (289 bytes)
www.eskimo.com/~scs/C-faq/q15.12.html
If the arguments must be passed directly as actual arguments, or if you do not have the option of rewriting the second function to accept a va_list (in other words, if the second, called function must accept a variable number of arguments, not a va_list), no portable solution is possible.