Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4743
| From | caw <cawright.99@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Visibility of value of variable bindings in module |
| Date | 2011-09-04 22:06 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j40spg$l13$1@smc.vnet.net> (permalink) |
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
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Visibility of value of variable bindings in module caw <cawright.99@gmail.com> - 2011-09-04 22:06 +0000 Re: Visibility of value of variable bindings in module "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-05 11:23 +0000
csiph-web