Dynamically declare variables



declare does not evaluate its arguments, because in the common case you
don't want or need them evaluated.

To call a function like this with dynamic arguments, you can use

        apply( 'declare, [ <<expression>>, 'constant ] )

Thanks for using Maxima,

               -s

On 5/9/07, ptomaine <ptomaine at bk.ru> wrote:
>
> I have a lot of variables: K111, K112, K113, K121, etc. And want to
> declare all of them constant.
> ...
> What is correct way to achive the same result as with the following?
>
> declare( K111, constant );
> declare( K112, constant );
> ....
> declare( K333, constant );
>