I'm fairly new to this, and I haven't been able to find any answers after searching repeatedly.
I have a Startscreen() function that I run during my setup sequence, and within that function i use various while loops and if/else conditionals. This function runs the startup screen of my program on my touch screen.
Well, when certain conditions are met inside a switch case, inside a while loop, I want to load my main screen and then immediately stop the whole Startscreen() function, like this:
However, I end up seeing my main screen load up, and then my Startscreen() function continues!
Apparently, "return;" does not work as advertised. If I wanted to break out of the current loop, I'd use "break;", right?
So my question is, does it matter that I'm using return; inside a while loop, inside a switch case? How do I exit the whole top-level function completely?
I already tried breaking out of the function and going straight to my main loop this way:
LoadMeasScrn(); loop(); return;
and the same thing happens.
So here's (most of) my entire code:
//////////REMOVED/////////THANKS FOR YOUR ANSWERS/////////////