"Bob Alexander" <balexander / rsv.ricoh.com> wrote in message
news:3C913571.CFF347A7 / rsv.ricoh.com...
> Sean O'Dell wrote:
>
> > Abort, Exit with status or Raise an exception.
> >
>
> "abort" is exactly equivalent to "exit(1)", as far as I can tell. An
optional
> message argument for exit would be fine, too.
>
> What about this:
>
> abort => no message, exit value 1
> abort("hello") => prints message, exit value 1
> abort(22, "hello") => prints message, exit value 22
>
> exit => no message exit value 0
> exit("hello") => prints message, exit value 1 (since printing of a message
> probably means there was an error)
> exit(22, "hello") => prints message, exit value 22

I like the examples for exit, but I'm still stuck on the notion that Abort
doesn't use parameters and it's strictly an "ease-of-use" function; for
quickly exiting, almost angrily exiting.  As in:

    if(user_cancelled) then abort

....whereas if the program failed, you would raise an exception or simply
exit, as in:

    if(operation_is_complete) then exit 0

....or:

    if(operation_failed) then raise "couldn't do that"

....or:

    if(operation_failed) then exit "something really, really bad happened,
bye"



    Sean