Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: Passing types to a subroutine Message-ID: <6959@chinet.chi.il.us> Date: 17 Nov 88 21:02:02 GMT References: <14457@mimsy.UUCP> <1988Nov11.183710.22545@utzoo.uucp> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 11 >> float a[100]; >> subroutine(...., a[100], ...); >> double a[100]; >> subroutine(...., a[100], ...); >>and have the subroutine do the right thing with a[]. How about passing a struct containing a type code and pointers to both types of arrays? The "unused" item could be left null and the type element would tell the function which pointer to use. Les Mikesell