display of "lisp arrays" from make_array



On 4/28/12 8:01 AM, Richard Fateman wrote:
> On 4/27/2012 12:33 PM, Raymond Toy wrote:
>>
>>
>> On Fri, Apr 27, 2012 at 11:22 AM, Richard Fateman
>> <fateman at eecs.berkeley.edu <mailto:fateman at eecs.berkeley.edu>> wrote:
>>
>>     I wonder if there is a reason to use lisp display rather than
>>     maxima display to show the results of make_array.
>>
>>     foo:make_array(any,5);
>>     foo[0]:2*x;
>>     foo;
>>
>>     foo displays as
>>              {Lisp Array: #(((MTIMES SIMP) 2 $X) NIL)}
>>
>>
>> Shouldn't they be displayed in some unique way so you can tell the
>> difference between a list and an array?
>>
>> Ray
>>  
> I'd be happy with something like LispArray{0..4}[2*x,
> false,false,....], for example.
> We need to specify where the element with index 0 is.
> More generally I think that we could 
> LispArray{type}{lo1..hi1}{lo2..hi2}...
>
Wouldn't this be a rather odd presentation?  All (almost all?) of
maxima's output can be pretty much cut-and-pasted and reused as input
(not including 2D output).  Would we have to be able to read that back in?

Why is the lower limit required in the output?  Lisp arrays always start
with index 0.

Ray