#626 LOAD fails to define a function if referenced before

closed
nobody
Lisp Core (472)
5
2013-11-24
2004-10-19
Robert Dodier
No

If I attempt to execute a function without loading it
first, then I still can't execute the function even
after trying to load it. For example:

(%i1) fft (aa, bb);
(%o1) fft(aa, bb)
(%i2) load ("fft");
(%o2)
/usr/share/maxima/5.9.1/share/numeric/fft.lisp
(%i3) fft (aa, bb);
(%o3) fft(aa, bb)

Now contrast this --

(%i1) load ("fft");
(%o1)
/usr/share/maxima/5.9.1/share/numeric/fft.lisp
(%i2) fft (aa, bb);
arg aa to fft//ift//recttopolar//polartorect must be
floating point array
-- an error. Quitting. To debug this try
DEBUGMODE(TRUE);

The error message shows the FFT was indeed executed.

If a file defines several functions (e.g.,
.../share/vector/vect.mac) it looks like any functions
not referenced before are successfully loaded, but any
that were referenced before are not loaded.

LOAD appears to avoid clobbering any existing
variables; maybe the function-loading phenomenon
described here is an aspect of that.

Discussion

  • Robert Dodier
    Robert Dodier
    2004-11-02

    Logged In: YES
    user_id=501686

    Changing

    (defun $fft ...)

    to

    (defun |$fft| ...)

    makes the problem go away, I've found.

     
  • Raymond Toy
    Raymond Toy
    2004-11-20

    Logged In: YES
    user_id=28849

    This problem no longer seems to occur with the
    case-sensitive version of maxima in CVS.

     
  • Robert Dodier
    Robert Dodier
    2004-12-27

    Logged In: YES
    user_id=501686

    This bug appears to be fixed by case-sensitivity stuff.
    Closing this bug report.

     
  • Robert Dodier
    Robert Dodier
    2004-12-27

    • status: open --> closed
     
  • Vero
    Vero
    2013-11-22

    Hi! I'm sorry for asking this here, but where can I find the fft file for maxima? this one you are talking about... I need it and have been searching for it around the net for some days, but I haven't been able to locate it with a mac or lisp file name.
    I'm aware this discussion is from 2004, but I hope someone can help me...

     
  • fft comes included with Maxima. You don't have to get it separately; where Maxima is installed in your disk there should be a directory share/mumeric with four files
    fft-core.lisp
    fft.dem
    fft.lisp
    fft.usg
    you just have to do "load(fft);". If it does not work, perhaps you installed Maxima from a Debian package and you didn't install the separate package maxima-share?