Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!MCIRPS2.MED.NYU.EDU!root From: root@MCIRPS2.MED.NYU.EDU Newsgroups: comp.sys.sgi Subject: Changing function transfer addresses Message-ID: <9005032021.AA01918@mcirps2.med.nyu.edu> Date: 4 May 90 17:02:50 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 X-Unparsable-Date: Thu, 3 May 90 13:21:55 DSD I want to do somthing like the following in ''c'' I want to make an array of function calls, and assign the function call addresses into the array, and then pick the function to be executed by the value in i. The particular application is using pup functions. Depending on the context of the function call, I want to change the pup function address. The compiler does not let me do anything like this, but this is theme of what I would like. What am I doing wrong, or what should I do?? (This is meta code--- I know it does not work) ====== register i; long MyPup; void (*function)[i](); /* an array of function call address pointers */ void function1(); /* static function calls */ void function2(); void function3(); *function[0]=*function1(); /* put in function the transfer addresses of function[1]=*function2(); each of the static functions */ function[2]=*function3(); MyPup=defpup(); addtopup(MyPup,"What happens here ?? %f",function[i]); ======= -- +-----------------------------------------------------------------------------+ | karron@nyu.edu Dan Karron | | . . . . . . . . . . . . . . New York University Medical Center | | 560 First Avenue \ \ Pager <1> (212) 397 9330 | | New York, New York 10016 \**\ <2> 10896 <3> | | (212) 340 5210 \**\__________________________________________ | +-----------------------------------------------------------------------------+