Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-adm!brl-smoke!smoke!woody%Juliet.Caltech.Edu@cit-hamlet.ARPA From: woody%Juliet.Caltech.Edu@cit-hamlet.ARPA (William E. Woody) Newsgroups: net.lang.c Subject: re: Array of pointers to functions Message-ID: <2456@brl-smoke.ARPA> Date: Mon, 7-Apr-86 18:52:05 EST Article-I.D.: brl-smok.2456 Posted: Mon Apr 7 18:52:05 1986 Date-Received: Thu, 10-Apr-86 00:46:32 EST Sender: news@brl-smoke.ARPA Lines: 23 Yesterday I asked which was right: "int (*foo[SIZE])()" or "int ((*foo)())[];" today I got several answers from a few folks out in net-land. Thank you everyone for helping me out in this small point of confusion. Though I have been using C for a couple of years, up until today the section of K&R on declaring variables mystified me; now I know a lot better. The solution I got was to look at declarations from the inside out; thus int foo - An integer int *foo - A pointer to an integer int (*foo)[] - An array of pointers to integers int ((*foo)[])() - An array of pointers to functions returning integers. The whole thing reads from inside out, just as english reads from right to left. Thank you very very much for your time and trouble on this one, net landers! - William Woody NET Woody%Romeo@Hamlet.Caltech.Edu USNAIL 1-54 Lloyd, Caltech / Pasadena, CA 91126