Hey there,
Happy to know people are there when there is a challenge. I see that return function is used to abort the code when it appears in the root level of an m-code. But when used in a function, it returns the program flow back to the invoking function.
Having this in mind, I wanna terminate the whole program when a sign of accomplishment is met inside a function. One way seems to be using return for several times to reach the root level. but what's so frustrating here is that this method implies checking the condition in each return again and again till getting into the root.
I know that error function would resolve the issue, but it's not sensible to produce an error when the code is successfully accomplished.
Please advise as necessary.
Best Answer