andre maute andre.maute at gmx.de
Sat Mar 10 06:37:26 CST 2012

```On 03/10/2012 02:13 AM, andre maute wrote:
> Hi list,
>
> as the subject says, suppose we have the following maxima file
> with a very simple hashed array function F
>
> ------------- hashed.max ------------
> display2d : false;
>
> F[k] := block(print(" F",k),return(k*11));
>
> for k : 1 thru 4 do block(
> h : F[k],
> print(k,h)
> );
> print("----");
> for k : 1 thru 4 do block(
> h : F[k],
> print(k,h)
> );
>
> for k : 1 thru 4 do block(
> h : F[[k,k]],
> print(k,h)
> );
> print("----");
> for k : 1 thru 4 do block(
> h : F[[k,k]],
> print(k,h)
> );
>
> print(F);
> print(arrayinfo(F));
> print(listarray(F));
> ------------- hashed.max ------------
>
> Question:
>
> arrayinfo and listarray give the computed values,
> Is it possible to save this data to a file and
> and load it again for a later computation?
>
> Any hint where I should look in the documentation?

Reduced question:

if I already know, that F should look like

(%i10) arrayinfo(F)
(%o10) [hashed,1,[1],[2],[3],[4],[[1,1]],[[2,2]],[[3,3]],[[4,4]]]
(%i11) listarray(F)
(%o11) [11,22,33,44,[11,11],[22,22],[33,33],[44,44]]

but don't want to recalculate using F,
how can I attach this data to F?

Best regards
Andre

```