View Single Post
  #11   Spotlight this post!  
Unread 14-04-2006, 10:33
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Can't get auto mode to run with OI switches

Quote:
Originally Posted by Imajie
Wouldn't you want to use AND not OR because it would always evaluate as true with OR since it is either greater than 20 OR less than 40.
I second that. Also, if you are meaning to do a logical OR, you need to be using a double pipe (i.e ||) not a single (i.e. |). The single pipe represents a bitwise OR, which can give you drastically different results. If you switch over to the AND, make sure that you use a double ampersand (i.e. &&) for the same reason.

You can find more information about bitwise operations here