if I use return() inside a switch statement, will I return out of the function that the switch is in, or will I only exit the switch statement?
if I use return() inside a switch statement, will I return out of the function that the switch is in, or will I only exit the switch statement?
The keyword return causes program flow to exit from the current function and return to the calling function.
If you want to exit the switch statement only, you can use break.
Last edited by Sargnagel; 05-04-2003 at 10:13 AM.