Victor Bazarov wrote:
Priya Mishra wrote:
void Update (ctext, input, inputLen)
M_C *ctext; char *input;
unsigned int inputLen;
{
// do some stuff
}
This is a very old (and as such non-standard) way of defining a
function. It wasn never part of C++. It was at some point part of
C, and IIRC, it was K&R C. By the time C was standardised this form
was replaced with the full declaration of the arguments between the
parentheses.
The old-style function definitions are still part of C, although
deprecated. From the C99 draft standard:
6.11.5 Function definitions
[#1] The use of function definitions with separate parameter
identifier and declaration lists (not prototype-format
parameter type and identifier declarators) is an obsolescent
feature.
Basically it's retained due to the tons of legacy code using this
definition style. No new C code should be done that way. C++, as you
say, never had it in a standard version, and I don't if any compilers
supported it in the pre-standard days.
Brian