MathGroup Archive 2010

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

Search the Archive

Re: Table local


On Nov 12, 9:58 pm, EF <he.frauendor... at t-online.de> 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
>
>    E. F.

Table ONLY localizes the iterator:

i = 3;
Table[i, {i, 3}] ==== {1,2,3}  // not {3, 3, 3}


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