>I can't read earlier post so I may be missing the point, but is there a=20 >reason > why you can't just use an array of pointers to functions for this ? > > PeterO An array of pointer to function only really works in a typesafe manner if=20 the signatures of all your functions is the same. You probably want a=20 structure containing pointers to the functions. (untested code follows!) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In a header used by both the provider and the consumer of the functions we= =20 define a structure type that maps the jump table. The elements of this=20 structure are pointers to functions with various signatures. typedef struct { void (*pA)(void); int (*pB)(int,int); } jmptable_t; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In the provider that defines the functions to be called we create an=20 instance of the jumptable and initialize it (hopefully by the=20 compiler/linker at build time) with pointers to the functions. void a(void) ; // prototype the functions first int b(int,int); // ...probably in an include file. jmptable_t jt =3D { a, b }; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In the consumer that calls the functions: // Declare a pointer to the jump table and initialize it to the hard addres= s=20 in the provider: jmptable_t *pJT; =3D (jmptable_t *) 0x12345678; // Now we can call the functions through the jump table: (*(pJT->pA))(); // call the first function i =3D (*(pJT->pB))(1,2); // call the second function Not sure the '*' belong in the calls above. Probably not. Also one pair of= =20 parens in each function call are probably unneeded. -- Bob Ammerman RAm Systems --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .