View Single Post
  #2   Spotlight this post!  
Unread 09-03-2006, 00:58
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Turning problems in Vex autonomous.

Code:
                  if ( angle > 0 & angle <= 90 )
This should be the logical operator &&, not the bit operator &.

Personally, I always write multiple expressions in the following form. It is more readable and forces the precedence I want. I have to type a few more keystrokes but it is worth the correctness and clarity.
Code:
                  if ( (angle > 0) && (angle <= 90) )
Otherwise someone who knows the functions you are calling will have to help you.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.

Last edited by Keith Watson : 09-03-2006 at 01:02. Reason: added not and fixed typo