Hello Ram,
> This
> for i:0 thru do 2
> x:3,
> disp(i,x);
> has the output i,3
> while
>
> for i:0 thru do 2
> (x:3,
> disp(i,x));
> yields correct result 0,3,1,3,2,3.
A for loop takes only one expression as the loop body.
So in
for i:0 thru 2 do e1, e2;
only e1 is recognized as the loop body.
Same with if-then-else -- the if-part is one expression and the
else-part is one expression also, and same with function definitions --
the function body is one expression.
Parentheses (e1, e2, e3) group expressions into one, likewise
block (e1, e2, e3) groups expressions into one.
It turns out that variable scope doesn't affect this particular problem.
> I am using maxima 5.9.2 on Fedora GCL 2.6.7. Thanks
You might consider installing 5.9.3. There were many changes.
HTH
Robert Dodier