Help with compile_file()



Hello,

I'm trying to learn how to use compile_file(), but am having a bit of
trouble.  I have a function explicit_fde() defined in a maxima batch
file (attached, explicit_fde.mac).  When I do

(%i) batch("explicit_fde.mac");
(%i) foo : explicit_fde([-1,0,1],1);
                                 f(x0 + h) - f(x0 - h)
(%o4)                        ---------------------
                                      2 h

it works fine.  Now I want to compile it, so I restart maxima and do

(%i) compile_file("explicit_fde.mac");

which compiles without warnings or errors.  Then when I call it

(%i) foo : explicit_fde([-1,0,1],1);

I get this error:

Warning: f has a function or macro call which has not been translated properly.
The function was totaly undefined. Maybe you want to quote it.
Subscript must be an integer:
i
 -- an error.  To debug this try debugmode(true);

You'll see in the attached file that explicit_fde() is defined like:

explicit_fde(steps, deriv) := block([ ... variables ...], ...
expressions ..., return(fde) );

and i is a local variable I use for some for loops, do I need to
declare it differently?  It is in the block variable list.

I'm using Maxima version 5.16.3 packaged for Fedora.

Thanks for any help.

-- 
Joshua Stults
Website: http://j-stults.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: explicit_fde.mac
Type: application/octet-stream
Size: 1139 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20090521/a877b109/attachment.obj