Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site greipa.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!greipa!jordan From: jordan@greipa.UUCP (Jordan K. Hubbard) Newsgroups: net.lang.c Subject: Re: Array of pointers to functions Message-ID: <172@greipa.UUCP> Date: Tue, 23-Apr-85 02:26:20 EST Article-I.D.: greipa.172 Posted: Tue Apr 23 02:26:20 1985 Date-Received: Thu, 25-Apr-85 03:16:13 EST References: <> Reply-To: jordan@greipa.UUCP (Jordan K. Hubbard) Organization: Genstar Rental Electronics, Palo Alto, Ca. Lines: 47 Summary: Ditto, I tried int *(fp_ret_ip[])() on my pyramid and it liked it fine. I was too lazy to test it with an aggregate initialization tho, So I can't in all honesty say that's the best way. Only thing I can say is that there seems to be a definate difference in the handling of * and [].. Some v7 compilers I've seen could give a hoot, it's all the same to them. Others will consider the difference significant. For instance: On the last v7 compiler I used, these two statements were equally valid: static char *foo = { "this", "that", "and the", "other thing" }; static char foo[] = { "etc..", "and so", " forth" }; However, a sysIII compiler on a 68K box would only grok the [] decl. I guess a semantic difference would be that in the latter case you were creating a temporarily unbounded array suitable for such an initialization, whereas you were only allocating space for a pointer before. But, as I say, it's semantic because you could also look at the fact that the static array of pointers is going to be in some compiler-reserved global area anyway & you are merely assigning the address (I hesitated to say 'global section', shades of VMS!).. This has been a puzzling question in the past & I have yet to run into it on 4.2 because I haven't done much of that type of coding on the pyramid yet.. I would welcome any flames/feedback or warnings on the subject. Mail is probably best, I'll summarize if necessary. (But HEY, if you want to start another discussion). -- Jordan K. Hubbard @ Genstar Rental Electronics. Palo Alto, CA. {sun, decwrl, dual}!twg!greipa!jordan I'm your private hacker, hacking for money, any old keyboard will do.. - Tina Turing