detecting lisp overflow



On 03/17/2013 04:02 PM, Edwin Woollett wrote:
> ----------------------
> By the way, what is going on with Maxima's string function when you
> try to use it in lisp:
> 
> (%i1) string(abc);
> (%o1) "abc"
> (%i2) :lisp ($string 'abc)
> Maxima encountered a Lisp error:
> 
> Error in PROGN [or a callee]: The function $STRING is undefined.
> ----------------------------------------------------------
> 

I think you want mfuncall:

(%i2) string(abc);
(%o2) "abc"
(%i3) :lisp ($string '$abc)
Maxima encountered a Lisp error:

 Error in PROGN [or a callee]: The function $STRING is undefined.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i3) :lisp (mfuncall '$string '$abc)
abc
(%i3) :lisp (mfuncall '$stringp (mfuncall '$string '$abc))
T

> Ted
> 

Cheers,
Kris Katterjohn