Open rtoy opened 3 months ago
Imported from SourceForge on 2024-07-07 06:21:33 Created by macrakis on 2004-02-24 01:31:55 Original: https://sourceforge.net/p/maxima/bugs/520
make_array arrays are useful but ugly.
They don't print properly:
ar: make_array(any,3)$ ar[1]: sin(x)$ ar => #(NIL ((%SIN SIMP) $x) NIL)
and even worse:
string(ar) => ?\#\(NIL\ \(\(\%SIN\ SIMP\)\ \$x\)\ NIL\)
There is no way to write a constant array, so you can't save it in Maxima form.
It's a pity that the function name "array" is taken... but we could define the external form of an array to be something like:
array_constant( <<type and maybe size>>, [ ...contents... ] )
e.g.
array_constant(any,[2,3,4])
is the same as
block([arr],arr:make_array(any,3), for i:0 thru 2 do arr[i]:[2,3,4][i])
etc.
Imported from SourceForge on 2024-07-07 06:21:34 Created by robert_dodier on 2006-07-24 02:12:27 Original: https://sourceforge.net/p/maxima/bugs/520/#e2f1
Imported from SourceForge on 2024-07-07 06:21:33 Created by macrakis on 2004-02-24 01:31:55 Original: https://sourceforge.net/p/maxima/bugs/520
make_array arrays are useful but ugly.
They don't print properly:
ar: make_array(any,3)$ ar[1]: sin(x)$ ar => #(NIL ((%SIN SIMP) $x) NIL)
and even worse:
string(ar) => ?\#\(NIL\ \(\(\%SIN\ SIMP\)\ \$x\)\ NIL\)
There is no way to write a constant array, so you can't save it in Maxima form.
It's a pity that the function name "array" is taken... but we could define the external form of an array to be something like:
array_constant( <<type and maybe size>>, [ ...contents... ] )
e.g.
array_constant(any,[2,3,4])
is the same as
block([arr],arr:make_array(any,3), for i:0 thru 2 do arr[i]:[2,3,4][i])
etc.