I think that the result Christian was expecting is what you get from:
for j:1 thru 2 do (
concat (b,j) :: 10*j,
print (ev (concat (b,j), infeval)));
There is a very nice old book: Darren Redfern, Edgar Chandler and
Richard N. Fell, Macsyma ODE Lab Book, 1998, where the authors use
concat() and ''(...) very intensely.
They do switch from ''(concat(...)) to ev(concat(...),infeval) inside
for loops.
I do agree that concat(...) and ''(...) should be avoided in favor of
other better ways to do the same.
Regards,
Jaime
On 25-09-2013 12:16, Stavros Macrakis wrote:
>
> ''(...) 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
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima