Ahead of "main"?
Hi all,
Going quite methodically through K& R ( as some of you can attest
to!), I have never seen a big diffference in declaring a function
within "main" or "ahead" of it. Now, (p119, K&R II), the discussion
states that "functions "whatever" " should be declared ahead of
main.
Is there a good reason for this?
thanks.
.
Relevant Pages
- Re: Ahead of "main"?
... Going quite methodically through K& R (as some of you can attest ... I have never seen a big diffference in declaring a function ... Old C also had no prototypes. ... (comp.lang.c) - Re: Ahead of "main"?
... Going quite methodically through K& R (as some of you can attest ... I have never seen a big diffference in declaring a function ... Defining is prohibited but declaring is allowed. ... so it doesn't matter where mainis ... (comp.lang.c) - Re: Ahead of "main"?
... I have never seen a big diffference in declaring a function ... Is there a good reason for this? ... There is no problem declaring functions inside main or any ... exactly why you would want to do it on the few occasions where it ... (comp.lang.c) - Re: Ahead of "main"?
... Going quite methodically through K& R (as some of you can attest ... I have never seen a big diffference in declaring a function ... In Standard C, functions cannot be declared "within" main; ... (comp.lang.c) - Re: Ahead of "main"?
... Barry Schwarz wrote, On 29/04/07 23:29: ... Going quite methodically through K& R (as some of you can attest ... Defining is prohibited but declaring is allowed. ... concerned, since on page 3 it says, "Function definitions cannot be nested..." ... (comp.lang.c) |
|