bbgil
Full Member level 2
too many actual parameters mikroc
hi. i got this code in which i want to call a subroutine. It got error that it has too many actual parameters. What is that error? How do you create and call a subroutine in the main program? any sample will help. or link? Needless to say, i'm a newbie in c. thnx in advance.
//
char n;
void flash () ;
void main()
{
while(1)
{
flash(5);//this is the error line
delay_ms(3000);
}
}
void flash
{ for (n=0; n < 5; n++)
{
trisb = 0;
portb.f0 = 1;
Delay_ms(500);
portb.f0 = 0;
Delay_ms(500);
}
}
hi. i got this code in which i want to call a subroutine. It got error that it has too many actual parameters. What is that error? How do you create and call a subroutine in the main program? any sample will help. or link? Needless to say, i'm a newbie in c. thnx in advance.
//
char n;
void flash () ;
void main()
{
while(1)
{
flash(5);//this is the error line
delay_ms(3000);
}
}
void flash
{ for (n=0; n < 5; n++)
{
trisb = 0;
portb.f0 = 1;
Delay_ms(500);
portb.f0 = 0;
Delay_ms(500);
}
}