Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4753

Re: Visibility of value of variable bindings in module

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Visibility of value of variable bindings in module
Date 2011-09-05 11:06 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j42agc$rn5$1@smc.vnet.net> (permalink)
References <201109042205.SAA21480@smc.vnet.net>

Show all headers | View raw


Values Set in the first argument of Module cannot be used within that List.

That's just the way it is!

Bobby

On Sun, 04 Sep 2011 17:05:15 -0500, caw <cawright.99@gmail.com> wrote:

> 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
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Visibility of value of variable bindings in module DrMajorBob <btreat1@austin.rr.com> - 2011-09-05 11:06 +0000

csiph-web