Re: a dangerous feature of Module[]?
- To: mathgroup at smc.vnet.net
- Subject: [mg57507] Re: a dangerous feature of Module[]?
- From: Scott Hemphill <hemphill at hemphills.net>
- Date: Tue, 31 May 2005 04:58:58 -0400 (EDT)
- References: <d76ol2$7si$1@smc.vnet.net> <d7dp1d$qag$1@smc.vnet.net>
- Reply-to: hemphill at alumni.caltech.edu
- Sender: owner-wri-mathgroup at wolfram.com
Gennady Stupakov <stupakov at yahoo.com> writes: > Thanks to everybody who replied to my post. > > Experts are aware of this feature of Module, and I was referred to a > recent discussion of a related issue in > http://forums.wolfram.com/mathgroup/archive/2005/May/msg00112.html > > I checked the description of scoping in Mathematica book (section 2.6) to > find out that most examples there use Set, rather then them SetDelayed, to > illustrate the mechanism of local variables in Module. The book totally > ignores all the subtleties of the scoping issues. That is frustrating -- > after more then 10 years programming in Mathematica I realised that many of my > codes might have serious bugs. Note that Block[] behaves differently from Module[]. Scott -- Scott Hemphill hemphill at alumni.caltech.edu "This isn't flying. This is falling, with style." -- Buzz Lightyear