OT: Programming in C

fred smith fredex at fcshome.stoneham.ma.us
Mon Apr 21 23:40:43 UTC 2008


On Mon, Apr 21, 2008 at 01:41:27PM -0400, Bill Davidsen wrote:
> Les Mikesell wrote:
> >Bill Davidsen wrote:
> >>
> >>>Quiz for next Friday. What are these and what's the difference 
> >>>between them:
> >>>
> >>>int     (*(**p)[])(int)
> >>declare p as pointer to pointer to array of pointer to function (int) 
> >>returning int
> >>
> >>>and
> >>>int     *(*(**p)[])(int)
> >>declare p as pointer to pointer to array of pointer to function (int) 
> >>returning pointer to int
> >>
> >>I would really want to see both a justification of method and 
> >>certificate of sanity to someone who actually used either. I can just 
> >>barely justify pointer to array of function returning int (state 
> >>machines), these look like something a compiler compiler would do.
> >
> >I sort of recall using a pointer to an array of structs as the basic 
> >data type for anything significant in C but I've mostly forgotten why. I 
> >think sometimes it had to do with getting usable semantics to access 
> >things in shared memory segments.
> >
> Pointer to struct is the heart of good linked lists, and a pointer to 
> array of struct is certainly a reasonably use. I certainly use arrays of 
> pointers to functions, both for state machines and and emulators, after 
> that it gets very hard to maintain.

And you can trust that Bill has been programming in C for a loooooooooong 
time!

I remember seeing his picture in a (forgive me for the bad words) Microsoft
ad in 1988 or maybe 1989 for MS-C! :)

> 
> -- 
> Bill Davidsen <davidsen at tmr.com>
>   "We have more to fear from the bungling of the incompetent than from
> the machinations of the wicked."  - from Slashdot

-- 
-------------------------------------------------------------------------------
 .----    Fred Smith   /              
( /__  ,__.   __   __ /  __   : /     
 /    /  /   /__) /  /  /__) .+'           Home: fredex at fcshome.stoneham.ma.us 
/    /  (__ (___ (__(_ (___ / :__                                 781-438-5471 
-------------------------------- Jude 1:24,25 ---------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080421/f081e1f8/attachment-0001.sig>


More information about the fedora-list mailing list