Xref: utzoo comp.lang.c:12363 comp.std.c:347 Path: utzoo!attcan!uunet!husc6!uwvax!rutgers!bellcore!clyde!mcdchg!chinet!att!ucbvax!decwrl!meest!djones From: djones@meest.UUCP (Dave Jones) Newsgroups: comp.lang.c,comp.std.c Subject: Re: Calling functions by address Message-ID: <758@goofy.meest.UUCP> Date: 30 Aug 88 23:00:35 GMT References: <679@mssx.UUCP> Organization: Megatest Corporation, San Jose, Ca Lines: 24 From article <679@mssx.UUCP>, by src@mssx.UUCP (Pleschutznig Andreas): ... > > So we thought of doing that job by declaring the addresses of the emulation > routines and jumping to the routines by address like this > > (*addressarray[code]); > > I know, I know that *does not* work, but maybe there is someone knowing to > get around. Nothing to "get around". There is nothing in your way. You just left off the empty parameter list (). (First language Pascal?) /* declaration */ int routine1(), routine2(), routineN(); int (*addressarray[])() = { routine1, routine2, routineN }; /* calling sequence */ int return_value = (*addressarray[code])(); #!