|
From: Arthur N. <ac...@ca...> - 2014-12-28 08:13:07
|
On Fri, 26 Dec 2014, Kostas Oikonomou wrote:
> A related, and perhaps simpler issue, is to improve 'rederr' when called
> in algebraic mode, as the current implementation seems to be aimed more
> at symbolic mode.
>
> If Reduce had a stop() or abort() command, it seems to me that this
> would be solved by simply saying
>
> write <arbitrary error message>
> stop()
>
>
> Kostas
If you read the manual you will find that BYE or QUIT is the command
to exit reduce. Note also the flag ERRCONT, because not everybody wishes
to have the system unconditionally exit at the first error. Indeed further
be aware of the (internal-level, not available to algebraic mode level
coders) function ERRORSET which evaluates something trapping errors.
ERRORSET is used in a number of places within the code to try one
procedure for solving a problem and if that scheme raises an error rather
than completing happily to proceed to a fallback. For use with that idiom
something that unconditionally displayed a message and unconditionally
terminated computation would not be useful.
So in your own user mode code there is nothing to prevent you from going
WRITE/QUIT. And because different parts of Reduce were written at
different times by different people there is no guarantee of absolute
constistency about when output is generated. The lisp-level variable !*msg
is often used to control "messages" that are diagnostics but not utter
crash reports.
I think it is also fair to say that in the original design for Reduce the
expectation was that algebraic mode would be used for user-level scripting
and that significant packages to be distributed for use by others would
end up with at least serious chuns of them ending up in symbolic mode
where the coder would have full access to all the messy low level
capabilities needed to refine the behaviour of their code utterly - but of
course that also means that at that level the coder needs to cope with all
the extra complexity and history revealed by digging under the surface.
Arthur
|