Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!caip!brl-adm!brl-smoke!smoke!gwyn@brl.arpa From: gwyn@brl.arpa (VLD/VMB) Newsgroups: net.lang.c Subject: Re: pointers to functions Message-ID: <1567@brl-smoke.ARPA> Date: Sun, 22-Jun-86 01:50:04 EDT Article-I.D.: brl-smok.1567 Posted: Sun Jun 22 01:50:04 1986 Date-Received: Tue, 24-Jun-86 04:00:56 EDT Sender: news@brl-smoke.ARPA Lines: 11 Although many C implementations will allow one to store function addresses in other types of pointers, such as (char *), it is not guranteed. Indeed, as I recall the latest X3J11 Draft it is not guaranteed even for (void *), the "generic" object pointer type. It is easy to get an array of function pointers. Just declare them properly (taking C operator precedence and associativity into account): void (*funcp[100])(); /* array of 100 ptrs to funcs */ (*funcp[9])( args ); /* invokes the 10th function */