MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Table local


On 11/13/2010 12:58 AM, EF wrote:
> "Help, More Information" for Table states:
>
>    Table effectively uses Block to localize values or variables.
>
>     But
>     Clear[u];
>     Table[u = i^2, {i, 5}];
>     u
>
>     Clear[u];
>     Table[u = i^2;, {i, 5}];
>     u
>
>     In both cases the value 25 for u is given.
>     If u were really local, it should have no value outside of the Table
>
>
>     For me there is a contradiction that can cause a lot of trouble

It is the index, i, that is local to the Table. Nothing contradictory 
here. I certainly would not expect (or want!) values generated by the 
table to be local.

-- 
Helen Read


  • Prev by Date: Re: Table local
  • Next by Date: Re: sieving out selected multiples
  • Previous by thread: Re: Table local
  • Next by thread: Re: Table local