Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!bullwinkle!uw-beaver!fluke!corey From: corey@fluke.UUCP (Corey Satten) Newsgroups: net.micro.att Subject: non bug in 7300 cc Message-ID: <1608@vax3.fluke.UUCP> Date: Tue, 18-Mar-86 11:59:41 EST Article-I.D.: vax3.1608 Posted: Tue Mar 18 11:59:41 1986 Date-Received: Fri, 21-Mar-86 06:22:28 EST Distribution: net Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 36 I'm afraid it took me so long to reply to this message that I've lost the original. I do remember that someone was complaining that the Unix-PC 7300 C compiler did not work for arrays of pointers to functions. The following small example demonstrates that (at least under rel 3.0) the compiler does, in fact, work. The C declaration for array of pointer to function is not very obvious, so I suspect that there is some chance that the original poster didn't get the declaration right. In any case, the following does work! char *one() {return "one";} char *two() {return "two";} char *three() {return "three";} /* * declare foo as array of pointer to function returning pointer to char */ char* (*foo[])() = { one, two, three }; main() { int i; for (i=0; i<3; ++i) { printf("%s\n", (*foo[i])()); /* prove that it works */ } } -- ******* Corey Satten; John Fluke Mfg. Co MS 223B; PO Box C9090 Everett WA 98206 {uw-beaver,decvax!microsoft,ucbvax!lbl-csam,allegra,tikal}!fluke!corey (206) 356-5058