Try catch and throw.
-s
On 9/3/08, Alasdair McAndrew <amca01 at gmail.com> wrote:
> I'm just playing around with implementing a backtracking algorithm
> recursively, and what I want is for the program to terminate (with an
> appropriate output) the moment a solution is found. return() doesn't do
> this, but error() does, if inelegantly. Is there any other way of forcing
> the termination of a program other than with error()?
>
> Thanks,
> Alasdair
>
> --
> Blog: http://amca01.wordpress.com
>
--
Sent from Gmail for mobile | mobile.google.com