View Single Post
  #22   Spotlight this post!  
Unread 07-02-2004, 21:08
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Compiler Help Needed

Quote:
Originally Posted by Mike Soukup
... From the names of your variables & the way you use them, it looks like those are values that will never change while your code is being executed, ie a constant. If so, there is no need to use a variable to store the values, use a #define instead:

Code:
#define axelWidth  .725
#define wheelRadius  .105
#define clicksPerRevolution  16
...
I, personally, have had problems with #declare in place of const, and only use it for alias, Example:
Code:
//Some constants
const char Varience = 10;
const char True = 255;
const char bLAH = 152;

//Some aliases
#declare Left_OI p1_y
#declare Left_Motor pwm01
#declare DyNoMiTe relay8
As long as you keep it in headers and include them, you should be ok.