old style functions??

Hello every one, as I sit here waiting to give the robot some tlc I wrote a function to drive our robot based upon encoders attached to the drive wheels

I go to compile it and the compiler says that [qutoe]old style function declarations not supported
when ni go to look at where the compiler says the problem is it points to the last } of the function. I checked that all the {}'s are ending themselves.

SO if any one is free at the moment could they tell me what the old style is and what I have to do to convert it over to the ‘new’ style

thankyou in advance

Why don’t you post the code?

Here’s an “old style” function declaration:


int myFunc( param1, param2, param3)
     char param1;
     int param2;
     short param3;
{
     printf("Got %d %d %d
", param1, param2, param3);
}

Here’s a “new style” function declaration:


int myFunc( char param1, int param2, short param3 )
{
    .....
}

(edited for correctness, as pointed out below)

http://support.microsoft.com/kb/79845 explains the difference.

Close, for “old style” function declarations the parameters went between the ) and the {:


int myFunc( param1, param2, param3)
     char param1;
     int param2;
     short param3;
{
     printf("Got %d %d %d
", param1, param2, param3);
}

Usually you get this error when the { character has been omitted.