|
From: Kostas O. <ko...@re...> - 2014-12-29 07:03:05
|
On 12/28/2014 02:55, Arthur Norman wrote:
> If you read the manual you will find that BYE or QUIT is the command
> to exit reduce.
Yes, I was aware of "quit". However, "quit" exits the whole Reduce
process, which is not what I had in mind. My notion of stop() or abort()
was that it would stop the currently running procedure and return to the
top level of Reduce.
> Note also the flag ERRCONT, because not everybody wishes to have the
> system unconditionally exit at the first error.
Yes, neither do I. Perhaps I misunderstand 'errcont', but 'on
errcont;' doesn't make a difference in the behavior of quit.
> 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.
Yes, having access to all of the low level is both "good" and "bad". My
problem is to terminate an algebraic-mode procedure when some condition
is detected. So my solution is
procedure xxxx(....);
begin;
<stuff>
if <error> then <<
write <error message, expressions, etc>;
rederr "";
>>;
<stuff>
end;
>
> Arthur
|