[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
About function declaration in C
From: |
Xue Fuqiao |
Subject: |
About function declaration in C |
Date: |
Wed, 3 Apr 2013 22:04:02 +0800 |
In this node:
http://www.gnu.org/prep/standards/html_node/Standard-C.html#Standard-C
There are two kinds of declaration:
int
foo (int x, int y)
…
and
int
foo (x, y)
int x, y;
…
And in this node:
http://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting
There are also two kinds of declaration:
static char *
concat (char *s1, char *s2)
{
…
}
and
static char *
concat (s1, s2) /* Name starts in column one here */
char *s1, *s2;
{ /* Open brace in column one here */
…
}
In the first node, it says that the first function is in standard
prototype form and the second function is in pre-standard style. And in
the second node, it says that the second form is _traditional_ C syntax.
I'm not familiar with editions of Standard C, but IMHO the _traditional_
C should be the standard one (not the pre-standard one).
Am I missing something?
--
Xue Fuqiao
http://www.gnu.org/software/emacs/
- About function declaration in C,
Xue Fuqiao <=