Youjun Hu
Youjun Hu

Reputation: 1324

Could argument type declariation be moved into function body?

That is, some kind of the following:

void t(m)
{int m;}

This code does not compile. I mostly use Fortran, which uses the above style.

Upvotes: 0

Views: 54

Answers (1)

Rorschach
Rorschach

Reputation: 32426

No, there is the obsolete declaration style as in the following,

void t(m)
  int m;
{
    (void)m;
}

however this is never (should never be, as @JonathanLeffler notes) used in modern code.

I recommend the book "C A Reference Manual" by Harbison and Steele for things like this.

Upvotes: 2

Related Questions