MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: Limit of list
  • Next by Date: Re: Two related question. Question 1
  • Previous by thread: Re: a dangerous feature of Module[]?
  • Next by thread: Re: a dangerous feature of Module[]?