On 9/28/10, Dan <vi5u0-maxima at yahoo.co.uk> wrote:
> a : 3 ;
> f(x) := ''(a*x^5) ;
> stringout("keepitall.mc",functions) ;
> g(x) := ''(7*x^4/f(x)) ;
> stringout("keepitall.mc",functions) ;
> b : 7 ;
> h(x) := ''(g(x)+(f(x))^b) ;
> stringout("keepitall.mc",functions) ;
If you want to put the function definitions in a batch script,
you'll want to write this stuff as define(foo(x), <body of foo goes here>)
instead of foo(x) := ''(<body of foo goes here>).
define evaluates the function body, while quote-quote has a subtly
different effect; quote-quote won't work as expected in a batch script.
> and so on. This works just fine until the stringout() after the
> sixty-ninth function definition (there are seventy-three altogether),
> which fails with the error message
>
> Error in `stringout' attempt
Hmm. stringout is rather hackish. I wouldn't be surprised if
the error is that too many streams are open or some other
nuttiness. How about this instead:
S : openw ("/tmp/myoutput"); /* now S is an output stream */
with_stdout (S, grind (fcn1), grind (fcn2));
with_stdout (S, grind (fcn3), grind (fcn4), grind (fcn5));
close (S);
Unfortunately I don't know what's wrong with your stringout
attempt so I'm suggesting for you to change course --
sorry for the bother.
Robert Dodier