While there are possible uses for contexts, are you sure you really need
them?
Or are you using contexts instead of simple bindings of variables?
You can do this:
foo[i]:= concat(foo,i);
apply(supcontext, [foo[3]])
etc.
On 6/28/2012 12:41 PM, J?rome Laurens wrote:
> Le 28 juin 2012 ? 16:46, Robert Dodier a ?crit :
>
>> On 2012-06-28, J?rome Laurens <jerome.laurens at u-bourgogne.fr> wrote:
>>
>>> Given a counter that takes integer values 1 or 2...,
>>> how can I create symbol named foo1 or foo2, ...
>>> based on the value of the counter
>>>
>>> foo[1], foo[2] is forbidden
>> Usually the "better way" to do that is to use subscripted variables.
>> So, why is foo[k] forbidden?
> supcontext only accepts symbols and complains when fed with a subscripted variable
>
> Jerome
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima