Bill Page wrote:
> 
> Waldek,
> 
> Thanks for the suggestion. I did have some success
> 
> (1) -> )lisp (defun string2spad (the-string) (let* ( (*standard-input*
> (make-string-input-stream the-string)) ) (|spadCompile| nil) ))
> 
> Value =3D STRING2SPAD
> 
> 1) -> )lisp (string2spad (concat ")abbrev domain XXX xxx" #\Linefeed
> "xxx():SetCategory=3D=3DInteger"))
>    XXX abbreviates domain xxx
>    Function declaration xxx : () -> SetCategory has been added to
>       workspace.
>                                                                    Type: Vo=
> id
> 
> Value =3D T
> 
> ----
> 
> But this does not seem to actually call the compiler! Instead the two
> lines of input appear to be processed by the interpreter. Why? I must
> be calling the compiler in the wrong manner.
>

AFAICS you need more complicated function:

)lisp (defun string2spad (the-string) (let* ( ($LISPLIB t) (|$InteractiveMode| 
nil) (*standard-input* (make-string-input-stream the-string)) ) (declare 
(special $LISPLIB |$InteractiveMode|)) (|spadCompile| nil) ))


This version sets $LISPLIB to t and $InteractiveMode to nil before
calling compiler.  I am not sure about $LISPLIB but you definitely
need |$InteractiveMode| set to nil to get disk output.  You
probably also want to set |$QuickLet| and |$QuickCode| to t.

> Of course I would really like to be able to pass the string from interprete=
> r.
> 
> (1) -> S:=3D")abbrev domain XXX xxx"
> 
>    (1)  ")abbrev domain XXX xxx"
>                                                                  Type: Stri=
> ng
> 
> (2) -> STRING2SPAD(S)$lisp
> 
>    The function STRING2SPAD is not implemented in NIL .
> 
> (2) ->
> 
> -----
> 
> But here  I do not understand the error message above. 

The message means that domain 'lisp' is undefined.  You need 'Lisp'.

-- 
                              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