home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Newsgroups: comp.lang.c
- Subject: Re: recursive variable arguments, can it be done?
- Message-ID: <1992Dec17.215727.6616@thunder.mcrcim.mcgill.edu>
- Date: 17 Dec 92 21:57:27 GMT
- References: <9212142052.AA00201@intuitiveedge.com>
- Organization: McGill Research Centre for Intelligent Machines
- Lines: 25
-
- In article <9212142052.AA00201@intuitiveedge.com>, monty@intuitiveedge.com (Montgomery Zukowski) writes:
-
- > Let's say I have two functions f1(...) and f2(...) which take a
- > variable argument lists.
-
- > Is there any way to have f1 call f2 function like printf() by passing
- > part of the variable argument list (the last part), or if not, then
- > the whole thing?
-
- No. You need to find or create a version of f2 that takes a va_list
- parameter instead of all the variable arguments. (In some
- circumstances, taking a va_list * might be preferable.) See the FAQ
- for more.
-
- > I know that printf() has another function vprintf() which has that
- > sort of functionality, but I wonder if there is a simpler way to
- > specify a va_list so I don't have to have another function
- > declaration like vprintf does for printf.
-
- No, there isn't; that's why vprintf exists.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-