Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.freetalk.english Subject: Question for the C experts Date: Thu, 03 Sep 1998 16:43:01 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 29 Message-ID: <35EEB905.940C6E98@ndirect.co.uk> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: dialin2-15.ndirect.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) In my days of 68000 programming, I used to make tables of sub-routine addresses so I could jump to them using an index - a bit like the old ON..GOSUB.. in BASIC. I'm now using: switch(f) { case 0: function0(); break; case 1: function1(); break; etc. etc. } which is not very efficient, especially if there are >20 functions. Is there any way I can hold a table of pointers to the functions and call them using an index? If so, could someone give me an example of the declarations required, and the call itself. Thanx. Herbs