View Single Post
  #4   Spotlight this post!  
Unread 24-01-2007, 22:58
brianafischer brianafischer is offline
Registered User
FRC #0503 (Frog Force)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Michigan
Posts: 17
brianafischer is on a distinguished road
Re: Typecasting Resources

Quote:
Originally Posted by TimCraig View Post
I suspect the underlying problem is that the students don't understand the size implications of the different variable types and what happens when you invoke arithmetic operations where the result exceeds that size. Or just how easy it is to exceed the size. Simply adding two quantities can produce an overflow. Also, with integer arithmetic the order the operations are specified can how a profound impact on the result. Understanding these topics is required to understand why most of the casting that is needed to program the FIRST RC is necessary.
That sums it up pretty well. I plan on creating a resource to spread the understanding of this issue. It is mentioned sporadically, but never really explained in the FIRST documents that I have browsed...

Please post more info/examples on this topic if you can!