Mega Search
23.2 Million


Sign Up

Make a donation  
Aborting a recursive subprogram by an exception  
News Group: comp.lang.ada

See also
http://stackoverflow.com/questions/25556441/aborting-a-recursive-subprogram-in-the-middle

If I want to abort a recursive subprogram in the middle, is throwing an
exception from it a good way to do this?

I am not sure whether exception optimizations allowed by Ada RM may not
nullify some external actions of the subprogram (such as modifying global
variables) which are before throwing the exception.

Will it work with exceptions the right way?

-- 
Victor Porton - http://portonvictor.org

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 28-Aug-2014, at 10:26 PM EST
From: Victor Porton