Re: Table local
- To: mathgroup at smc.vnet.net
- Subject: [mg113811] Re: Table local
- From: Helen Read <readhpr at gmail.com>
- Date: Sun, 14 Nov 2010 06:08:05 -0500 (EST)
- References: <ibl9ek$b72$1@smc.vnet.net>
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