Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!agate!usenet.ins.cwru.edu!ncoast!catfood From: catfood@NCoast.ORG (Mark W. Schumann) Newsgroups: comp.lang.c Subject: Re: Passing Variable Numbers of Arguments Message-ID: <1991Feb17.003504.23932@NCoast.ORG> Date: 17 Feb 91 00:35:04 GMT References: <5196@media-lab.MEDIA.MIT.EDU> Organization: North Coast Public Access Un*x (ncoast) Lines: 28 In article <5196@media-lab.MEDIA.MIT.EDU> dyoung@media-lab.media.mit.edu.UUCP (David Young) writes: >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? vsprintf() is part of ANSI C according to my Turbo manual. ^^^^^^^^ -- ============================================================ Mark W. Schumann 3111 Mapledale Avenue, Cleveland 44109 USA Domain: catfood@ncoast.org UUCP: ...!mailrus!usenet.ins.cwru.edu!ncoast!catfood