View Single Post
  #2   Spotlight this post!  
Unread 26-01-2008, 20:05
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Variables Change randomly

Quote:
Originally Posted by sparrowkc View Post
IT ALWAYS RETURNS 1919!!!!
How do you know what the return value is? I once spent hours trying to debug a routine that seemed to be returning the wrong value, only to discover that the error was in the line of code that prints the value.

But upon further inspection, the problem with your code is rather obvious to someone who hasn't been staring at it for hours. You merely forgot to return the newly computed value.

Last edited by Alan Anderson : 26-01-2008 at 20:07.