for



On Sat, May 9, 2009 at 11:37 AM, Michel Talon <talon at lpthe.jussieu.fr> wrote:
> Adam Majewski wrote:
>
>> for radius:4 thru 1 step -1 do disp(radius);
> (%i5) for radius:4 thru 1 step ''s do disp(radius);

No!  This is a very bad "solution".  The 'unquote' operator ('' -- two
single quotes) is evaluated at the time an expression is *read*, not
the time it is evaluated, so it should be used only in the very
special case where an interactive result is to be incorporated in an
input -- though it is cleaner to do that using the 'define' function.

The case that Majewski found is simply a bug in 'do' and should be fixed.

           -s