> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Kreyl > Sent: Monday, September 22, 2008 3:10 AM > To: avr-chat; avr-chat@nongnu.org > Subject: [avr-chat] function with default value of argument > > > Hi! > > I would like to use function with default value of an argument, so I > wrote next: > > Definition: > > void LCDWrite (uint8_t Destination, uint8_t AData, uint8_t > DontWait=0);
That is incorrect C AFAIK. > Implementation: > > void LCDWrite (uint8_t Destination, uint8_t AData, uint8_t > DontWait) { > // do smth. > } > > > But I receive error message about definition: > > error: expected ';', ',' or ')' before '=' token > And that is why you got the error message. You cannot give a "default value" to a parameter in C language. > What am I doing wrong? Where can I read about it? The GCC User Manual? I don't know if you are try to use some C language extension that I'm not aware of, or C++, or something else... _______________________________________________ AVR-chat mailing list AVR-chat@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-chat