Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!carroll From: carroll@s.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: Needed: A (Portable) way of settin Message-ID: <207600023@s.cs.uiuc.edu> Date: 4 Jun 89 17:27:00 GMT References: <708@mitisft.Convergent.COM> Lines: 20 Nf-ID: #R:mitisft.Convergent.COM:708:s.cs.uiuc.edu:207600023:000:947 Nf-From: s.cs.uiuc.edu!carroll Jun 4 12:27:00 1989 /* Written 11:58 am Jun 2, 1989 by gwyn@smoke.BRL.MIL in s.cs.uiuc.edu:comp.lang.c */ In article <708@mitisft.Convergent.COM> kemnitz@mitisft.Convergent.COM (Gregory Kemnitz) writes: >I need to know how (or if) *NIX (System V.3) has the ability to let >a stack of arguments be set for a function before it is called. (...) Let's assume for the sake of simplicity that all the arguments have the same type. (...) /* End of text from s.cs.uiuc.edu:comp.lang.c */ If that's not the case, you can wrap the arguments in a union, and pass an array of those, e.g. (assuming you can count on argument types) union Argument { int i; float j; char *s; } ; union Argument arg_list[MAX_ARGS]; /* array to pass */ Alan M. Carroll "And there you are carroll@s.cs.uiuc.edu Saying 'We have the Moon, so now the Stars...'" CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll