What is the maximum # of Nested IF THEN's you can have with a 16F877 MCU?
Does the Compiler warn you if you exceed this number?
Printable View
What is the maximum # of Nested IF THEN's you can have with a 16F877 MCU?
Does the Compiler warn you if you exceed this number?
as i expect you can have as many as you want or program memory is able to contain them.
I don't see any reason why it should have a maximum. BUT maybe i'm wrong.
Sometime SELECT CASE is a good way to reduce IF THEN statements.
I seemed to remember a Maximum of 4 nested.
I have been trying to call up the manual to doublecheck my
answer, but the site doesn't seem to be working.
Dwayne
That's subroutines with a 4 max. IF... THEN's do not use the stack and therefore have no restriction. The compiler will warn you if you run out of program codespace.
Melanie>>That's subroutines with a 4 max. IF... THEN's do not use the stack and therefore have no restriction<<
Thanks a MILLION!... I knew I remembered something like a max of 4 on something...Since I may never met that max, I just blow it off.
Dwayne