Andrey G. Grozin wrote:
>
> On Mon, 10 Jan 2011, Waldek Hebisch wrote:
> > Yes, that is useful. I think that 'pre' is too unspecific, what
> > about 'FRICAS_PREINIT' and '--preinit'? Also I similar way we can
> > add 'FRICAS_EVAL_LISP' and '--eval-lisp' to evaluate arbitrary
> > piece of Lisp code. And maybe 'FRICAS_EVAL' and '--eval' for
> > interpreter input. The execution order would be Lisp, then
> > preinit then eval.
> It seems that --eval provides all the necessary functionality.
> --eval ')lisp (lisp-code)'
> --eval ')read something.input'
> The file something.input can contain )lisp lines
> All possibilities are covered.
>
> This should be evaluated after .fricas.input but before an interactive
> session, so that something.input could adjust things from .fricas.input
> for the purpose of the present session (for example, a session from
> TeXmacs or from emacs).
>
The following (minimally tested) patch implements 'FRICAS_EVAL' in
AXIOMsys:
Index: src/interp/int-top.boot
===================================================================
--- src/interp/int-top.boot (revision 972)
+++ src/interp/int-top.boot (working copy)
@@ -93,11 +93,17 @@
$ncmMacro := NIL
$ncmPhase := NIL
+do_pre_eval() ==
+ ec := getEnv('"FRICAS__EVAL")
+ if ec then
+ CATCH('SPAD__READER, CATCH('top__level, parseAndEvalStr ec))
+
spad() ==
-- starts the interpreter, read in profiles, etc.
$PrintCompilerMessageIfTrue: local
setOutputAlgebra "%initialize%"
readSpadProfileIfThere()
+ do_pre_eval()
runspad()
'EndOfSpad
--
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.