Question: For loop and non local index

Hello,

I have a little question about the property "local" or not of a index in a for loop.

I notice that when I make "for loop" the index i is not local. In the small example, when I ask to evaluate i after having done this loop, the answer is 5 and not i.

Example :

for i from 1 to 4 do
i^2
od;

i; --> 5

How can I do to ask Maple to use index as local ?

Thanks a lot for your help.

 

Please Wait...