Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!hp-pcd!hpcvia!brianh From: brianh@hpcvia.CV.HP.COM (brian_helterline) Newsgroups: comp.lang.c Subject: Re: Passing variable length argument list to functions Message-ID: <31530013@hpcvia.CV.HP.COM> Date: 27 Jul 90 15:14:48 GMT References: <1990Jul26.174236.3849@hri.com> Organization: Hewlett-Packard Co., Corvallis, Oregon Lines: 29 >I want to create a routine called from C that receives a variable length >argument list (just like printf() for example). How does one do that in >C? In fact, if anyone could tell me how printf does it (or where I might >find the code on my Sparc), that would be good enough. Can you say varargs? :) You probably won't find the source for printf, but take a look at vprintf and varargs.h. These should explain how to handle varaible length arguments. > >Thanks in advance. Your welcome in retrospect. >------------------------------------------------------------------------------ >Mark P. Stockley | INET: mps@hri.com | But I don't like Spam!!! >Horizon Research | Voice: (617) 466-8361 | >1432 Main St., | | Is the alphabet in that order >Waltham MA. 02154 | FAX: (617) 466-8323 | or is it because of that song? >------------------------------------------------------------------------------ >---------- ------------------------------------------------------------------------------- Brian Helterline brianh@hpcvia.cv.HP.COM Hewlett Packard ..!hp-pcd!hpcvia!brianh Corvallis, OR 97330 Warning: error C390 - No saying found. core dump.