What I'm saying is that multiple IF/THEN statements:
IF this then
that
ENDIF
IF this then
that
ENDIF
made back-to-back-to-back, takes more flash space than successive IF/THEN statements:
If this then
if this then
if this then
that
endif
endif
EndIf
I had to use the successive version of the IF/THEN vs. the back-to-back version in my MP3 player in a number of places (no way around it due to how the program was set up, either it was bad style or I just had too much going on to keep tabs on, just the nature of the program's complexity). Anywhos...when I changed everything over to the successive type, I saved a load of code space. I never did check in to why I saved as much space as I did, it just did, and I'm happy.
As far as stack space goes, are you saying that there aren't any calls involved with doing an if/then?
Bookmarks