Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!asuvax!noao!arizona!dave From: dave@cs.arizona.edu (David P. Schaumann) Newsgroups: comp.lang.c Subject: Help with varargs Message-ID: <136@caslon.cs.arizona.edu> Date: 12 Mar 90 23:00:05 GMT Distribution: usa Organization: U of Arizona CS Dept, Tucson Lines: 25 I want to write a routine that uses variable number of args that passes *all* of it's args to another routine. I tried this: int s( size, va_alist ) int size ; va_dcl { t( size, va_alist ) ; } int t( size, va_alist ) int size ; va_dcl { int i ; va_list ap ; /* do some stuff with va_alist */ } Unfortunately, when I do this, only the first value in va_alist is right. Everything else is garbage. Anybody know how to fix this? Thanx, Dave dave@cs.arizona.edu