avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] function with default value of argument


From: Ori Idan
Subject: Re: [avr-chat] function with default value of argument
Date: Mon, 22 Sep 2008 12:54:44 +0300

The C language does not have means for default arguments, therefore you get an error on such a definition.

--
Ori Idan


On Mon, Sep 22, 2008 at 12:10 PM, Kreyl <address@hidden> wrote:
   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);

 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


 What am I doing wrong? Where can I read about it?

 Thanx!


                                         Best regards,
                                                       Kreyl

                                         mailto: address@hidden
                                            ICQ: 171094105



_______________________________________________
AVR-chat mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-chat



--
ספרים וסיפורים שכתבתי: http://www.thestories.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]