Needed: A (Portable) way of settin

carroll at s.cs.uiuc.edu carroll at s.cs.uiuc.edu
Mon Jun 5 03:27:00 AEST 1989


/* Written 11:58 am  Jun  2, 1989 by gwyn at smoke.BRL.MIL in s.cs.uiuc.edu:comp.lang.c */
In article <708 at mitisft.Convergent.COM> kemnitz at 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 at 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



More information about the Comp.lang.c mailing list