Martin Rubey wrote:
> 
> It seems that )history )restore doesn't like graphics.
> 
> For example:
> 
> (1) -> draw(x^2,x=0..1)
>    Compiling function %B with type DoubleFloat -> DoubleFloat 
>    Graph data being transmitted to the viewport manager...
>    FriCAS2D data being transmitted to the viewport manager...
> 
>    (1)  TwoDimensionalViewport: "x^2"
>                                                  Type: TwoDimensionalViewport
> (2) -> )history )save /home/martin/test.fri
> 
> 
> (1) -> )history )rest /home/martin/test.fri
>  
>    >> Error detected within library code:
>    undefined function: WRAPPED
> 
> 
> Any ideas?
> 

the ')history )save' command saves not only commands but also
values produced by commands.  "Normal" values in interpreter are
Lisp expression that has to be passed to Lisp eval to get
real value.  However, some values are already evaluated and
there is no need to evaluate them second time (in fact, evaluating
twice may get us into trouble).  Such values are representd as 
Lisp List having "WRAPPED" as first element.

Apparently history save and restore functions think that "WRAPPED"
is a function call.  

The following patch seem to help:

diff -u trunk.bb/src/interp/i-syscmd.boot trunk/src/interp/i-syscmd.boot
--- trunk.bb/src/interp/i-syscmd.boot   2008-10-03 18:16:52.000000000 +0200
+++ trunk/src/interp/i-syscmd.boot      2008-10-08 02:45:53.000000000 +0200
@@ -1886,6 +1886,7 @@
 spadClosure? ob ==
   fun := QCAR ob
   not (name := BPINAME fun) => nil
+  name = "WRAPPED" => nil
   vec := QCDR ob
   not VECP vec => nil
   name

-- 
                              Waldek Hebisch
[EMAIL PROTECTED] 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to