Re: function prototype vs function declaration
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Tue, 18 Dec 2007 12:24:33 +0000
Ravishankar S said:
<snip>
My amended article would be:
It turns out that there is no difference between function declarations
and
function prototypes as far as modern use of C is concerned.
I think you should stop writing tutorials and start reading them. There is
a very important distinction between a declaration and a prototype, and
you do your readers a disservice by not making the distinction clear.
What's more, there are (rather recondite) circumstances where you could
conceivably need to eschew the prototype form - I'm thinking particularly
of arrays of pointer to function where not all the functions have the same
type. It is important to know when to use the prototype form (i.e. nearly
always) and when it *might* be a good idea not to.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
- Follow-Ups:
- Re: function prototype vs function declaration
- From: h03Ein
- Re: function prototype vs function declaration
- From: Ravishankar S
- Re: function prototype vs function declaration
- References:
- function prototype vs function declaration
- From: Ravishankar S
- Re: function prototype vs function declaration
- From: Richard Heathfield
- Re: function prototype vs function declaration
- From: Ravishankar S
- Re: function prototype vs function declaration
- From: santosh
- Re: function prototype vs function declaration
- From: Ravishankar S
- function prototype vs function declaration
- Prev by Date: Re: A question regarding Q20.1 from c-faq.com
- Next by Date: Re: object file size is reduced after build
- Previous by thread: Re: function prototype vs function declaration
- Next by thread: Re: function prototype vs function declaration
- Index(es):
Relevant Pages
|