Switching off follow-up questions?



On 5/12/07, Gerd Kortemeyer <korte at lite.msu.edu> wrote:

> We are working on integrating Maxima into a student homework system.

Good luck, and keep us posted ...

> (%i2) overlap: integrate((6*cos(9*x)+6*sin(8*x))*(j-x),x,-%pi,%pi)/%pi;
> Is  j  positive, negative, or zero?
>
> - that's an excellent question, but doesn't work for us, since we are
> not running interactively. Is there a way to tell Maxima to just
> throw an error?

I've attached a couple of patches which cause ASKSIGN1
and ASK-PROP to throw something instead of asking the user.

solve (x^a + 1, x);
 => `throw' not within `catch':
askprop(a, integer)
 -- an error.

integrate (x^a, x);
 => `throw' not within `catch':
asksign(a + 1, znz)
 -- an error.

I'm pretty sure there are some other kinds of questions Maxima
can ask but I think most questions are routed through ASKSIGN1
or ASK-PROP.

These patches are the interesting part of tmp-asksign1.lisp
which is referenced on this page which describes an attempt
to work around the question asking stuff.
http://maxima.sourceforge.net/wiki/index.php/Noninteractive%20mode

HTH
Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: askp.lisp-no-questions-patch
Type: application/octet-stream
Size: 509 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070513/43b84412/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compar.lisp-no-questions-patch
Type: application/octet-stream
Size: 1558 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070513/43b84412/attachment-0001.obj