Visibility of value of variable bindings in module
- To: mathgroup at smc.vnet.net
- Subject: [mg121215] Visibility of value of variable bindings in module
- From: caw <cawright.99 at gmail.com>
- Date: Sun, 4 Sep 2011 18:05:15 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hi Module[{x = Sum[i, {i, Length[{1, 2, 3}]}], y = x + 1}, Print[y]; Print[x]] prints out: 1 + x 6 So, in the variable declaration section of the Module statement, the binding of x to 6 isn't visible to y. (It's a bit like let and let*, but not) Is there a form which will allow the bindings to be visible within the variable declaration section? thanks very much chris
- Follow-Ups:
- Re: Visibility of value of variable bindings in module
- From: Leonid Shifrin <lshifr@gmail.com>
- Re: Visibility of value of variable bindings in module
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: Visibility of value of variable bindings in module