[Simh] IO functions
Rhialto
rhialto at falu.nl
Sun Jun 28 08:17:14 EDT 2015
On Sat 27 Jun 2015 at 21:03:33 -0400, Bill Cunningham wrote:
>
> void (*sim_vm_init) (void)
>
> Well what is this. The function returns nothing and takes nothing
> right? What's the *sim_VM_init in parenthesis referring too? That's my
> question.
This is a basic C FAQ. It means that sim_vm_init is a pointer (to a
function).
An alternative way of reading it is as follows:
if
void f(void);
declares a function, then this does too:
void (*g)(void);
where *g is the function. In other words, g is a pointer to a function.
See http://c-faq.com/decl/cdecl1.html for a bit more extended
explanation of C declaration syntax.
-Olaf.
--
___ Olaf 'Rhialto' Seibert -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl -- 'this bath is too hot.'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20150628/a800492b/attachment-0001.sig>
More information about the Simh
mailing list