Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!psuvax1!psuvm!brl102 From: BRL102@psuvm.psu.edu (Ben Liblit) Newsgroups: comp.lang.c Subject: Re: Arrays of functions - calling them with different number of args. Message-ID: <90065.102500BRL102@psuvm.psu.edu> Date: 6 Mar 90 15:25:00 GMT References: <8553@cbnewsh.ATT.COM> Distribution: na Organization: Penn State University Lines: 20 In article <8553@cbnewsh.ATT.COM>, ijk@cbnewsh.ATT.COM (ihor.j.kinal) says: > >I've set up an array of 50 functions, to be called with one standard >argument, and my function call looks like this [which particular >function to be called is determined by the action_ind. > > action_tbl [ action_ind ] ( one_arg ) > > where the one_arg is a pointer to a particular type. > >Now, I want to add some functions that will have two arguments. The best solution I can think of is to stick with a single argument, but make one_arg a void pointer. A particular function will typecast one_arg to a pointer to a structure containing the actual parameters to be used. Make any sense? Ben Liblit BRL102 @ psuvm.bitnet -- BRL102 @ psuvm.psu.edu "Fais que tes reves soient plus longs que la nuit."