There is a global variable called arrays, which is a list of arrays. If
you want a local array, you need to
use the function local inside the block with the array name as an argument.
Otherwise, the array will be entered into the global array namespace.
I think this is because Macsyma has array functions, and functions are
global.
Dan Stanger
miguel lopez wrote:
>Michel Van den Bergh <michel.vandenbergh <at> uhasselt.be> writes:
>
>
>
>>Sorry for all the questions but maxima behaves quite differently from
>>the languages I am used to (python, c)
>>
>>
>>
>
>s[n]:=n^2;
>g(s):=block([i],print(s[4]));
>g(cat);
>
> it gives 16.
>
>
>
>
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
>