ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject [OT] K&R format (Was: build.exe)
Date Tue, 10 Jul 2001 04:00:13 GMT
From: Michael Jennings [mailto:southgate.software@home.com]

> > one of our developers in the czech republic uses something he call
> "kernigan
> > and ritchie"-style (don't even know if I have got the names 
> right) while
> > programming in Java :-(
> 
> K&R is kinduva dinosaur way of doing C function declarations as in:
> somefunction(x,y,z)
> (
> int x;
> char y;
> char *z;
> )
> {
> }
> 
> Or something like that anyways.

Kinda.

K&R versions of C had declarations/definitions like:

int somefunction( x,y,z )
	int x ;
	char y ;
	char * z ;
{
	/* some code */
}

Which was then "fixed" by ANSI.

But K&R formating is to do with the way they layout their code in "The C programming language",
which is (from 2nd Edition [ANSI])

    int Foo(int arg) {
        if (arg) {
            bar();
            return 1;
        } else
            return 0;
    }

Mime
View raw message