View Single Post
  #2   Spotlight this post!  
Unread 25-03-2008, 14:46
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Too many (If, Else If) statements?

This somewhat depends on where you put the if-else statements and if you had them all properly scoped. If you're putting these in an interrupt service routine, then it might just be taking up too much time and you'd get a red light of death. If you're doing this elsewhere then timing shouldn't be an issue. You might instead have some misplaced braces that are causing you to skip past the PutData() command or something. C18 doesn't seem to do anything too stupid when compiling nested if-elses, so I'm unsure what else this might be unless your code is so long that it needs to be using the large code model and you're not using it at the moment. Perhaps if you just tried re-compiling your original code. I can't think of anything other than a corrupted file that would keep the controller in a program state after a download.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter