home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!pacbell.com!iggy.GW.Vitalink.COM!nocsun.NOC.Vitalink.COM!wetware!ditka!eagercon!eagercon!eager
- From: eager@eagercon.com (Michael J. Eager)
- Subject: Re: Multiple Parameter Passing (unspecified number)
- Message-ID: <1992Nov19.173922.14256@eagercon.com>
- Sender: root@eagercon.com (Operator)
- Reply-To: eager@eagercon.com
- Organization: Eager Consulting
- References: <1992Nov17.105837.21867@henson.cc.wwu.edu>
- Date: Thu, 19 Nov 1992 17:39:22 GMT
- Lines: 17
-
- In article 21867@henson.cc.wwu.edu, n8743196@henson.cc.wwu.edu (Jeff Wandling) writes:
- >I'm trying to do a similar thing, except my function doesn't know what type
- >to expect. The next "variable argument" could be any simple type. How
- >do I deal with this? Is there a way to switch on the type of the next
- >argument? When using union's for example---
-
- The function receiving the value has to know what to expect, or it has to be
- told in some fashion. Values in C do not identify their types. So you have to
- pass the information in some form, perhaps in a control string like printf,
- or in an array with type codes.
-
-
- ---
- Michael J. Eager Michael.Eager@eagercon.com
- Eager Consulting (415) 325-8077
- 1960 Park Boulevard, Palo Alto, CA 94306-1141
-
-