#1284 Compiled maxima code containing $ARRAY gets a Lisp error.

closed
nobody
5
2007-12-26
2007-10-23
Kai Yue
No

The following shows the problem. The file below contains the
function test_array_comp(). It runs fine with interpreter. But got the error
"function $ARRAY is undefined". I could have used make_array. But its use
has other problems for my application.

Thanks.

Kai

file "test-array.max" :

test_array_comp(x) :=block([abc, i],
array(abc, 3),
for i thru 3 do (abc[i]: i*i),
abc[3] : x,
print(abc, abc[3], abc[2]),
x : x*2,
x)$

maxima session:

(%i222) load("test-array.max");
(%o222) test-array.max
(%i223) test_array_comp(3);
abc 3 4
(%o223) 6

(%i224) compile_file("test-array.max");

Translation begun on test-array.max.
(%o224) [test-array.max, test-array.LISP, test-array.UNLISP,
/hm/maxima/test-array.x86f]
(%i225) loadfile("test-array");
(%o225) test-array
(%i226) test_array_comp(3);

Maxima encountered a Lisp error:

Error in KERNEL:%COERCE-TO-FUNCTION: the function $ARRAY is undefined.

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

Discussion

  • Robert Dodier

    Robert Dodier - 2007-12-26
    • status: open --> closed
     
  • Robert Dodier

    Robert Dodier - 2007-12-26

    Logged In: YES
    user_id=501686
    Originator: NO

    I've committed changes which, I believe, correct this bug.

    src/acall.lisp r1.21, src/trans1.lisp r1.11, src/trans2.lisp

    Closing this report as fixed.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks