The sample code accompanying a textbook I'm reading (on image analysis) has function definitions in an unusual syntax that I've never seen before. The compiler accepts it with no complaints, but I'm wondering where this syntax comes from. Anybody know anything about its history?
Here's a example (not from the book - just my own simple example to show the syntax):
Code:
#include <stdio.h>
int
main( argc, argv ) //This is the part I find unusual.
int argc; //It's sort of nice because provides convenient space to
char* argv[]; //attach comments about each of the function arguments.
{
char buffer[100];
strcpy(buffer, "world");
if( argc == 2 )
{
strcpy( buffer, argv[1] );
}
printf( "Hello, %s\n", &buffer );
return 0;
}