Thread: Overflow?
View Single Post
  #3   Spotlight this post!  
Unread 16-02-2005, 13:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Overflow?

Quote:
Originally Posted by Zalumaskov
If I don't move the robot the pos_x and pos_y stay 0 for a while then suddenly become 32767 (max int value?)
Your code probably thinks pos_x and pos_y are equal to -1.

32767 is also a (signed int) -1 printed as an (unsigned int).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle