View Single Post
  #9   Spotlight this post!  
Unread 02-03-2013, 18:50
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Encoder Problem.

Quote:
Originally Posted by slijin View Post
Try changing "TestEnc" to "testEnc". You're not supposed to capitalize variable names.
I don't see any reason it wouldn't work if you capitalize variable names. In fact, I highly recommend using some sort of mixed case or underscores to separate words in variables for readability.

I personally am a fan of capitalizing the first letter of a variable name to indicate it is a variable, and naming all macros in all capitals with underscores separating words to differentiate them.

I've also seen incredibly structured variable naming methods that define everything about a variable in the name. For example, using three to six letter module name prefixes, and coding the type or units in (e.g. p for pressure, or kpa for kilopascals), or type of variable (e.g. m for map, c for calibration, etc.) and these work as well.

It's really all personal preference, as long as you are consistent the compiler really doesn't care at all.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack