Yes, I get the same behaviour with v5.16.3. The 'solution' is to invoke
the script via
maxima < script.mac
Maxima reads from standard input and the shell provides the script.
Alternatively, you can write a single line script with the command
load("script.mac") and then invoke
maxima -b load-script.mac
Either way works fine for me.
Perhaps someone else can comment on why 'batch' is causing these
problems.
Leo.
On Mon, 1 Dec 2008, Kai Schaeffer wrote:
< Hello everyone,
<
< I have a weird problem witch this simple batch file:
<
< kill(all);
< load (unit);
< setunits(N);
< numer:true;
< g:9.81*m/s^2;
< D:20*millimeter;
< P_L:0.05*N;
< my:0.02;
< L:10*millimeter;
< Wi:0.9;
< J_S:0.00017712946*kg*m^2;
< J_Z1:0.000011568173*kg*m^2;
< J_Z2:0.00022234309*kg*m^2;
< J_M:0.000094*kg*m^2;
< Um:4000*minute^-1;
< Z_1:20;
< Z_2:40;
< M_x:25*kg;
< M_y:50*kg;
< V:20*m/minute;
< t:0.3*s;
< F:50*N;
< T_1(M):=(F+my*M*g)*L/(2*%pi*Wi)*(Z_1/Z_2);
< J_D(M):=J_Z1+J_M+(Z_1/Z_2)^2*(J_Z2+J_S+M*(L/(2*%pi))^2);
< T_2(t,M):=J_D(M)*(2*%pi*Um/(t));
< T_2(t,M_x);
<
< When I run it via the "batch" command I get a stack overflow at the
< definition of "T_1(M)" and "J_D(M)" (a "Bind stack overflow" under Linux
< and a "Invocation history stack overflow" under Windows) . The weird
< part is now: when I enter these lines manually everything works perfectly.
<
< What could I do?
<
< Thank you
< Kai
<
< --
< Schaeffer AG
< Dipl.-Phys. Kai Schaeffer Vorstand
< Nahmitzer Damm 32 Tel. +49-30-8058695-25
< 12277 Berlin FAX: +49-30-8058695-33
< http://www.schaeffer-ag.de
<
< HRB 93611 B, Amtsgericht Berlin Charlottenburg
< Vorstand: J?rg Schaeffer, Kai Schaeffer
< Aufsichtsrat: Dieter Kersten (Vorsitzender)
<
<
< _______________________________________________
< Maxima mailing list
< Maxima at math.utexas.edu
< http://www.math.utexas.edu/mailman/listinfo/maxima
<
<
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.