Is there a method one could call to Exit from inside a nested procedure which will also exit the owner/parent procedure?
procedure OwnerProc;
procedure NestedProc;
begin
// Do some code here
EXIT_ALL; {Call a method which will exit NestedProc and OwnerProc}
end;
begin
NestedProc;
end;
Is there a method one could call to Exit from inside a nested procedure which will also exit the owner/parent procedure?
No there is not.
You could raise an exception, and catch it in the outer function. But personally I would regard that as rather ugly. Perhaps cleaner is to return a boolean from the inner function and then exit
if the inner function returns False
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With