On Tue, 10 Feb 2009 11:45:52 +0000 Richard F <[email protected]> wrote:
> Hi > > Call me a newbie, but is there anything wrong with the following statement? > > rtc.time_element.tm_wday = (rtc.time_element.tm_wday < 6) ? a = ( a < 6 ) Looks strange. the '<' is used to evaluate/test if a condition is true or false. What the compiler is probably doing is testing the logical (true or false) result of the expression rtc.time_element.tm_wday < 6 and then putting that back into rtc.time_element.tm_wday Your week day will therefore be either 1 (result of evaluting the right-hand expression is TRUE) or 0/False. > rtc.time_element.tm_wday++ : 0; This statement also looks very strange to me, I fail to understand what you were trying to achieve when writing this... -- Vince _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
