Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] K & R function?

You must be young, or maybe I’m old.

 

In K&R C, which is really the original C, had a weird way of declaring the type of the parameters of functions. They appeared as declarations after the function name and parameter names but before the code block. Like this:

 

int foo(bar)

    int bar;

{

    return bar;

}

 

It also used int as the default return type for functions if you didn’t specify one.

 

It was very error prone but there’s still code out there written to it.

 

Doug Schaefer, QNX Software Systems

Eclipse CDT Project Lead, Tools PMC member

http://cdtdoug.blogspot.com

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Yuan Zhang
Sent: Thursday, July 06, 2006 5:02 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] K & R function?

 

Hi,

 

What is K&R C Function?

 

Thanks,

 

Yuan 


Back to the top