problem with "concatting variables"



Thanks for your help. I am a maxima-autodidact and I am using Maxima a 
lot in my daily work as a teacher. I looked for a way to create 
variables (respectively names of variables) "dynamically" and learned 
about concat in the reference guide and about ''(...) by trial and 
error. I did not know of a[i] so far.

Christian

Am 25.09.2013 13:16, schrieb Stavros Macrakis:
>
> ''(...) Is *read-time* substitution, a very special-purpose 
> mechanism.  Try ev(...).
>
> But why are you creating variables in this strange way in the first 
> place? Why not use a[i]?
>
> Also, how did you learn about ''(...) and concat? I wonder if there's 
> some documentation or tutorial that's miseducating people... we see 
> this problem often.
>
>       -s
>
> On Sep 25, 2013 5:21 AM, "Christian Stengg" <christian.stengg at gmx.at 
> <mailto:christian.stengg at gmx.at>> wrote:
>
>     Hello,
>
>     why do I get the output bj in the loop?
>
>     Thanks for any help,
>     Christian
>
>
>     i:1;
>     concat(a,i)::10*i;
>     ''(concat(a,i));
>     print(''(concat(a,i)));
>
>     for j:1 thru 2 do (
>         concat(b,j)::10*j,
>         print(''(concat(b,j)))
>     );
>
>     b1;
>     b2;
>
>
>     (%o1) 1
>     (%o2) 10
>     (%o3) 10
>     10
>     (%o4) 10
>     bj
>     bj
>     (%o5) done
>     (%o6) 10
>     (%o7) 20
>     _______________________________________________
>     Maxima mailing list
>     Maxima at math.utexas.edu <mailto:Maxima at math.utexas.edu>
>     http://www.math.utexas.edu/mailman/listinfo/maxima
>
> E-Mail ist virenfrei.
> Von AVG ?berpr?ft - www.avg.de <http://www.avg.de>;
> Version: 2013.0.3408 / Virendatenbank: 3222/6696 - Ausgabedatum: 
> 24.09.2013
>