From: SourceForge.net <no...@so...> - 2004-09-14 22:12:48
|
Bugs item #1027555, was opened at 2004-09-13 16:03 Message generated for change (Comment added) made by arcanum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1027555&group_id=68108 Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Eric Weddington (arcanum) Summary: preprocessor's bug ? Initial Comment: At the following: . . #define vMotDivStage2 40; . . SIGNAL(SIG_OVERFLOW1) { static uint8_t PreDiv = 0; . . . PreDiv = -1 + vMotDivStage2; At above approach all is ok (39 is assigned to PreDiv) but if the last lines is like this: PreDiv = vMotDivStage2-1; value of 40 is assigned to PreDiv. ---------------------------------------------------------------------- >Comment By: Eric Weddington (arcanum) Date: 2004-09-14 16:12 Message: Logged In: YES user_id=543419 Do NOT add a semicolon after a #define statement defining a value: #define vMotDivStage2 40; This causes the statement: PreDiv = vMotDivStage2-1; To be preprocessed into: PreDiv = 40;-1; which of course assigns 40 to PreDiv as expected. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=1027555&group_id=68108 |