Re: function prototype vs function declaration
- From: "Ravishankar S" <ravishankar.s@xxxxxxxxxxxx>
- Date: Tue, 18 Dec 2007 18:17:37 +0530
"Richard Heathfield" <rjh@xxxxxxxxxxxxxxx> wrote in message
news:S4adnVMRZ6GnJvranZ2dnUVZ8qGdnZ2d@xxxxxxxxx
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.
I am making that distinction.Its only the perception that differs. I was
infact wondering whether I should make that
sentence ("there is a minor yet important difference between function
declaration and function prototype"). But I changed
since I have to make its importance clear.
I am sure 90/100 C progrmmers are not aware of this distiction given now
that function
prototypes are common.
I was thinking that my conclusions are fairly accurate!
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.
But I cannot help but note that what you have mentioned may also be achieved
by using void pointer's.
.
- Follow-Ups:
- Re: function prototype vs function declaration
- From: santosh
- 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
- Re: function prototype vs function declaration
- From: Richard Heathfield
- function prototype vs function declaration
- Prev by Date: Re: character array as bits
- Next by Date: Re: function prototype vs function declaration
- Previous by thread: Re: function prototype vs function declaration
- Next by thread: Re: function prototype vs function declaration
- Index(es):
Relevant Pages
|