Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!media-lab!dyoung From: dyoung@media-lab.MEDIA.MIT.EDU (David Young) Newsgroups: comp.lang.c Subject: Passing Variable Numbers of Arguments Message-ID: <5196@media-lab.MEDIA.MIT.EDU> Date: 11 Feb 91 21:59:45 GMT Reply-To: dyoung@media-lab.media.mit.edu.UUCP (David Young) Organization: MIT Media Lab, Cambridge MA Lines: 23 I'd like to be able to write a macro or a function that will take an unspecified number of arguments -- similar to how the printf() function works. What I'd like is something that could transform a call like: PringMsg( window, formatString, ) into the following chunk of code: { sprintf( globalFoo, formatString, ); BlahBlah( window, globalFoo); } I was hoping to find something similar to the &rest capability of Lisp. But am scared I'll have to end up using vprintf(). Can anyone help or offer a suggestion or solution? Thanks, david young