Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!umd5!uvaarpa!mcnc!ece-csc!jnh From: jnh@ece-csc.UUCP (Joseph Nathan Hall) Newsgroups: comp.lang.c Subject: Re: Args: var number & var types Message-ID: <3577@ece-csc.UUCP> Date: 12 May 88 16:08:05 GMT References:Reply-To: jnh@ece-csc.UUCP (Joseph Nathan Hall) Organization: North Carolina State University, Raleigh, NC Lines: 16 In article jv0l+@andrew.cmu.edu (Justin Chris Vallon) writes: >Is there any way to declare a function to have two arguments point to the same >place in the stack-frame? Let's say that I want to write the implementation of >foo which takes an optional argument based upon the first parameter: ... You can do this by a) using a variable-length argument list or b) passing your argument(s) in a union. Approach b) wastes a little space but is more conventional, hence more easily understood and probably easier to port between older compilers. -- v v sssss|| joseph hall || 201-1D Hampton Lee Court v v s s || jnh@ece-csc.ncsu.edu (Internet) || Cary, NC 27511 v sss || the opinions expressed herein are not necessarily those of my -----------|| employer, north carolina state university . . . . . . . . . . .